Skip to content

Commit 6156c57

Browse files
committed
docs: add bugfix newsfragment and dags_needing_dagruns dataset docstring
1 parent 5065888 commit 6156c57

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

airflow/models/dag.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4069,6 +4069,11 @@ def dags_needing_dagruns(cls, session: Session) -> tuple[Query, dict[str, tuple[
40694069
This will return a resultset of rows that is row-level-locked with a "SELECT ... FOR UPDATE" query,
40704070
you should ensure that any scheduling decisions are made in a single transaction -- as soon as the
40714071
transaction is committed it will be unlocked.
4072+
4073+
For dataset-triggered scheduling, DAGs that have ``DatasetDagRunQueue`` rows but no matching
4074+
``SerializedDagModel`` row are omitted from the returned ``dataset_triggered_dag_info`` until
4075+
serialization exists; queue rows are **not** deleted here so the scheduler can re-evaluate on a
4076+
later run.
40724077
"""
40734078
from airflow.models.serialized_dag import SerializedDagModel
40744079

newsfragments/63546.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix premature dataset-triggered DagRuns when ``SerializedDagModel`` was missing while ``DatasetDagRunQueue`` still had rows for that DAG; queue entries are kept for the next evaluation.

0 commit comments

Comments
 (0)