Skip to content

[v3-3-test] Limit deadline alerts endpoint to the latest serialized Dag row (#70804) - #70965

Merged
bbovenzi merged 1 commit into
v3-3-testfrom
backport-1b3121d-v3-3-test
Aug 3, 2026
Merged

[v3-3-test] Limit deadline alerts endpoint to the latest serialized Dag row (#70804)#70965
bbovenzi merged 1 commit into
v3-3-testfrom
backport-1b3121d-v3-3-test

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
  • The deadline alerts endpoint fetches the latest serialized Dag by
    ordering all rows for a dag_id descending and reading the first one.
    Without a LIMIT, the database materializes every serialized version of
    the Dag when only the newest is needed. Cap the lookup at a single row.

  • Sort imports in deadline alerts UI route tests

  • UI: Allow reading deadline alerts of a specific Dag version

A backfill run executes the Dag version that was current when it was
queued, whose deadline alerts may differ from the ones deployed today.
The endpoint could only ever resolve the newest serialized Dag, so the
UI reported present-day alerts for historical runs and misrepresented
what those runs were actually held to.

Resolving the version through DagVersion.version_number also removes a
reliance on the serialized_dag primary key sorting chronologically,
which only held because uuid7 happens to be time-ordered and would give
the wrong row if an older version were serialized after a newer one.
Only the primary key is read, so the serialized Dag blob no longer
crosses the wire for a lookup that discards it.
(cherry picked from commit 1b3121d)

Co-authored-by: Richard richard9@ualberta.ca

…ag row (#70804)

* The deadline alerts endpoint fetches the latest serialized Dag by
ordering all rows for a dag_id descending and reading the first one.
Without a LIMIT, the database materializes every serialized version of
the Dag when only the newest is needed. Cap the lookup at a single row.

* Sort imports in deadline alerts UI route tests

* UI: Allow reading deadline alerts of a specific Dag version

A backfill run executes the Dag version that was current when it was
queued, whose deadline alerts may differ from the ones deployed today.
The endpoint could only ever resolve the newest serialized Dag, so the
UI reported present-day alerts for historical runs and misrepresented
what those runs were actually held to.

Resolving the version through DagVersion.version_number also removes a
reliance on the serialized_dag primary key sorting chronologically,
which only held because uuid7 happens to be time-ordered and would give
the wrong row if an older version were serialized after a newer one.
Only the primary key is read, so the serialized Dag blob no longer
crosses the wire for a lookup that discards it.
(cherry picked from commit 1b3121d)

Co-authored-by: Richard <richard9@ualberta.ca>
@boring-cyborg boring-cyborg Bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Aug 3, 2026
@eladkal
eladkal marked this pull request as ready for review August 3, 2026 05:55
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.3.1 milestone Aug 3, 2026
@bbovenzi
bbovenzi merged commit f296bba into v3-3-test Aug 3, 2026
176 of 186 checks passed
@bbovenzi
bbovenzi deleted the backport-1b3121d-v3-3-test branch August 3, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants