SIGN IN SIGN UP
apache / airflow UNCLAIMED

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows

0 0 267 Python

Fix TriggerDagRunOperator fail_when_dag_is_paused on Airflow 3.2+ (#67726)

On Airflow 3.x the paused check called DagModel.get_current(), which
accesses the ORM directly and is blocked from task execution, so
fail_when_dag_is_paused=True raised "Direct database access via the ORM
is not allowed". It was previously stubbed to raise NotImplementedError
on Airflow 3.x.

Resolve the target DAG's paused state through the task-SDK get_dag()
accessor (backed by the GetDag execution-API endpoint) and raise
DagIsPaused when paused. This works on Airflow 3.2.0+, where the endpoint
and accessor exist. On Airflow 3.0/3.1 the operator still fails fast at
construction with a clearer NotImplementedError pointing to the 3.2.0
requirement. The Airflow 2.x path is unchanged.

Fixes #56954.
K
Kaxil Naik committed
508ced8e82db10c786b511b5b4e73f5f1748fb6f
Parent: 8fd35a1
Committed by GitHub <noreply@github.com> on 5/29/2026, 6:08:49 PM