subhash-0000 commented on code in PR #60818:
URL: https://github.com/apache/airflow/pull/60818#discussion_r2748892945
##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -598,9 +598,11 @@ def get_running_dag_runs_to_examine(cls, session: Session)
-> ScalarResult[DagRu
.where(cls.state == DagRunState.RUNNING)
.join(DagModel, DagModel.dag_id == cls.dag_id)
.join(BackfillDagRun, BackfillDagRun.dag_run_id == DagRun.id,
isouter=True)
+ .join(Backfill, isouter=True)
.where(
- DagModel.is_paused == false(),
DagModel.is_stale == false(),
+ # allow backfills to run on paused DAGs
+ or_(DagModel.is_paused == false(),
DagRun.backfill_id.isnot(None)),
Review Comment:
The `DagRun.backfill_id.isnot(None)` condition is used to allow backfill
runs to execute even when the DAG is paused. This way, regular scheduled runs
are blocked if the DAG is paused, but backfills (which have a non-None
`backfill_id`) can still run. This matches the requested behavior to support
backfills on paused DAGs.
--
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]