hussein-awala commented on code in PR #64610:
URL: https://github.com/apache/airflow/pull/64610#discussion_r3539940510
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:
##########
@@ -319,12 +322,24 @@ def get_asset_events(
source_map_index: Annotated[
FilterParam[int | None],
Depends(filter_param_factory(AssetEvent.source_map_index, int | None))
],
+ partition_key: QueryAssetEventPartitionKeyFilter,
+ partition_key_pattern: QueryAssetEventPartitionKeyRegex,
name_pattern: QueryAssetNamePatternSearch,
name_prefix_pattern: QueryAssetNamePrefixPatternSearch,
timestamp_range: Annotated[RangeFilter,
Depends(datetime_range_filter_factory("timestamp", AssetEvent))],
session: SessionDep,
) -> AssetEventCollectionResponse:
"""Get asset events."""
+ if partition_key.value is not None and partition_key_pattern.value is not
None:
+ raise HTTPException(
+ status_code=status.HTTP_400_BAD_REQUEST,
+ detail="partition_key and partition_key_pattern are mutually
exclusive.",
+ )
Review Comment:
I removed it. `partition_key` and `partition_key_regexp_pattern` now combine
with AND on both the Core and Execution APIs, and I updated the tests
accordingly.
--
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]