justinpakzad commented on code in PR #63665:
URL: https://github.com/apache/airflow/pull/63665#discussion_r2967987671
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dags.py:
##########
@@ -340,6 +339,20 @@ def patch_dags(
except ValidationError as e:
raise RequestValidationError(errors=e.errors())
+ has_filters = any(
+ [
+ dag_id_pattern.value is not None,
+ tags.value is not None and tags.value.tags,
+ owners.value,
+ ]
Review Comment:
I think I misunderstood and thought it made sense to exclude those as a
safeguard so a user doesn't accidentally unpause all paused dags, but yea it's
confusing. Will revert these changes since all that needs fixing is the
pagination + documenting the wildcard search parameter (as you mentioned).
##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py:
##########
@@ -768,6 +768,34 @@ class TestPatchDags(TestDagEndpoint):
[DAG1_ID],
[DAG1_ID],
),
+ (
+ {"tags": ["tag_2"], "tags_match_mode": "any"},
+ {"is_paused": True},
+ 200,
+ [DAG1_ID],
+ [DAG1_ID],
+ ),
+ (
+ {"tags": ["tag_2", "example"], "tags_match_mode": "all"},
+ {"is_paused": True},
+ 200,
+ [DAG1_ID],
+ [DAG1_ID],
+ ),
+ (
+ {"tags": ["dummy"], "tags_match_mode": "any"},
+ {"is_paused": True},
+ 200,
+ [],
+ [],
+ ),
+ (
+ {"owners": ["test_owner"], "exclude_stale": False},
Review Comment:
Will do.
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dags.py:
##########
Review Comment:
Will make that change. Thanks for pointing that out.
--
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]