Skip to content

[v3-3-test] Exclude non-successful runs from AVERAGE_RUNTIME deadline calculation (#68647) - #68949

Merged
potiuk merged 1 commit into
v3-3-testfrom
backport-88e6110-v3-3-test
Jun 26, 2026
Merged

[v3-3-test] Exclude non-successful runs from AVERAGE_RUNTIME deadline calculation (#68647)#68949
potiuk merged 1 commit into
v3-3-testfrom
backport-88e6110-v3-3-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

DeadlineReference.AVERAGE_RUNTIME computes a deadline from the average duration of
past DAG runs, but the query filtered only on dag_id + start/end-date present — with
no DagRun.state filter. Failed runs (which may have died fast or hung before failing)
were folded into the average, skewing the computed deadline: a fast-failing history
makes it too short (spurious misses), a slow-then-failed history makes it too long
(real slowness never trips it).

Filter the duration query to successful runs only. Add tests asserting failed runs
are excluded from the average and that the deadline is skipped when too few
successful runs exist.


(cherry picked from commit 88e6110)

Co-authored-by: Sean Ghaeli 58916776+seanghaeli@users.noreply.github.com
Co-authored-by: Sean Ghaeli ghaeli@amazon.com
Co-authored-by: Ramit Kataria ramitkat@amazon.com

… calculation (#68647)
DeadlineReference.AVERAGE_RUNTIME computes a deadline from the average duration of
past DAG runs, but the query filtered only on dag_id + start/end-date present — with
no DagRun.state filter. Failed runs (which may have died fast or hung before failing)
were folded into the average, skewing the computed deadline: a fast-failing history
makes it too short (spurious misses), a slow-then-failed history makes it too long
(real slowness never trips it).
Filter the duration query to successful runs only. Add tests asserting failed runs
are excluded from the average and that the deadline is skipped when too few
successful runs exist.
---------
(cherry picked from commit 88e6110)
Co-authored-by: Sean Ghaeli <58916776+seanghaeli@users.noreply.github.com>
Co-authored-by: Sean Ghaeli <ghaeli@amazon.com>
Co-authored-by: Ramit Kataria <ramitkat@amazon.com>
@potiuk
potiukforce-pushed the backport-88e6110-v3-3-test branch from 57f847e to 07f8646CompareJune 26, 2026 19:04
@potiuk
potiuk merged commit af73b58 into v3-3-testJun 26, 2026
76 checks passed
@potiuk
potiuk deleted the backport-88e6110-v3-3-test branch June 26, 2026 20:41
@github-actionsgithub-actionsBot added this to the Airflow 3.3.1 milestone Jun 26, 2026
@github-actions

Copy link
Copy Markdown
ContributorAuthor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.1 based on: merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@potiuk@seanghaeli