dheerajturaga commented on code in PR #73763:
URL: https://github.com/apache/airflow/pull/73763#discussion_r4166692390
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -817,6 +817,10 @@ def trigger_dag_run(
f"DAG with dag_id: '{dag_id}' does not support bundle
versioning",
)
+ if body.drain_dag:
+ requires_access_dag(method="PUT", param_dag_id=dag_id)(request,
user)
Review Comment:
All three routes now check Dag edit access explicitly and return `Draining
requires permission to edit Dag: <id>`. Removed the unused `Request`
parameters. Changing the option clears the mutation error in all three flows;
the trigger regression covers 403 → Keep paused → successful retry, and pending
requests stay disabled.
---
Drafted-by: Codex (GPT-6); reviewed by @dheerajturaga before posting
--
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]