pierrejeambrun commented on code in PR #64610:
URL: https://github.com/apache/airflow/pull/64610#discussion_r3544941059
##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -1639,6 +1695,13 @@ def _transform_ti_states(states: list[str] | None) ->
list[TaskInstanceState | N
QueryAssetAliasNamePrefixPatternSearch = Annotated[
_PrefixSearchParam,
Depends(prefix_search_param_factory(AssetAliasModel.name,
"name_prefix_pattern"))
]
+QueryAssetEventPartitionKeyFilter = Annotated[
+ FilterParam[str | None],
+ Depends(filter_param_factory(AssetEvent.partition_key, str | None,
filter_name="partition_key")),
+]
+QueryAssetEventPartitionKeyRegex = Annotated[
+ _RegexParam, Depends(regex_param_factory(AssetEvent.partition_key,
"partition_key_regexp_pattern"))
+]
Review Comment:
Maybe in `paginated_select`, add a check. If one of the filters is an
instance of `_RegexpParam` and there is no timeout set for the request -> big
server failure, refusing to process.
That doesn't cover 'all cases' someone could still use a bare _RegexpParam
without using the `paginated_select` helper but that will cover 'most cases' of
using filters.
And maybe something in the `_RegexParam` docstring, explaining that the
caller query using this should time bound calling `apply_regex_query_timeout`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]