guan404ming commented on code in PR #61833:
URL: https://github.com/apache/airflow/pull/61833#discussion_r2815350150
##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/dag_runs.py:
##########
@@ -112,6 +112,15 @@ def trigger_dag_run(
},
)
+ if dm.allowed_run_types is not None and DagRunType.MANUAL.value not in
dm.allowed_run_types:
+ raise HTTPException(
+ status.HTTP_400_BAD_REQUEST,
+ detail={
+ "reason": "denied_run_type",
+ "message": f"Dag with dag_id '{dag_id}' does not allow manual
runs",
+ },
+ )
+
Review Comment:
This check has been removed. Parse-time validation `in
_validate_allowed_run_types` already raises a ValueError if an asset-scheduled
DAG doesn't include `ASSET_TRIGGERED` in `allowed_run_types`, so the runtime
check was redundant.
--
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]