UI: Fix task states stuck stale when a run finishes quickly#70319
Merged
bbovenzi merged 1 commit intoJul 24, 2026
Merged
Conversation
The Grid/Graph TI-summaries stream re-fetches on an interval that is gated on the dag run still being active. When a run reaches a terminal state before the next tick fires — common for sub-interval runs on low-latency deployments — the interval is cleared without ever fetching the final task states, so node badges and grid cells stay frozen on whatever the last stream saw (often "no status") until a full remount. Re-stream once on the active→terminal transition so the final states always land, mirroring the self-gating behaviour of the polled run queries which never stop before observing a terminal state.
Andrushika
requested review from
bbovenzi,
choo121600,
guan404ming,
pierrejeambrun,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
July 23, 2026 18:52
bbovenzi
approved these changes
Jul 24, 2026
Contributor
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
shahar1
pushed a commit
that referenced
this pull request
Jul 25, 2026
…ly (#70319) (#70397) The Grid/Graph TI-summaries stream re-fetches on an interval that is gated on the dag run still being active. When a run reaches a terminal state before the next tick fires — common for sub-interval runs on low-latency deployments — the interval is cleared without ever fetching the final task states, so node badges and grid cells stay frozen on whatever the last stream saw (often "no status") until a full remount. Re-stream once on the active→terminal transition so the final states always land, mirroring the self-gating behaviour of the polled run queries which never stop before observing a terminal state. (cherry picked from commit 47a0324) Co-authored-by: Andrew Chang <69671930+Andrushika@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Grid/Graph task badges come from the
ti_summariesstream. The stream only re-fetches while the dag run is active. If the run finishes before the next tick (default 3s), the interval is cleared and the final task states are never fetched. The badge then stays stale until a remount.I was testing my dag (which can finish within 3s). After it finished, the badge kept showing "no status" while the run panel already showed success:
2026-07-24.1.29.43.mov
What
useGridTiSummariesStreamnow remembers whether the runs were active in a ref. When they go from active to terminal, it bumpsrefreshTickonce, which triggers one final re-stream through the existing fetch path. Grid and Graph share this hook, so both views get the fix.Added two tests: the final re-stream happens exactly once (fails without the fix), and opening an already-finished run does not fetch twice.
After:
2026-07-24.2.44.01.mov
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Opus 4.8 following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.