Skip to content

Fix DAGs list page Last Run/Next Run going stale after runs complete - #70667

Merged
bbovenzi merged 3 commits into
apache:mainfrom
bramhanandlingala:fix/70663
Aug 13, 2026
Merged

bbovenzi merged 3 commits into
apache:mainfrom
bramhanandlingala:fix/70663

Conversation

@bramhanandlingala

Copy link
Copy Markdown
Contributor

Summary
The DAGs list page (/dags) stops auto-refreshing once none of the visible
DAGs has a run in a pending state. Since that's the normal resting
condition, "Last Run" and "Next Run" (and the Recent Tasks counts) go stale
and never update again until a manual page reload.

Root cause
useDags and useDagRunStateCounts each set refetchInterval: false
whenever no DAG on the current page is mid-run, permanently killing
polling. Every other page in the UI instead uses
useAutoRefresh({ checkPendingRuns: true }), which checks pending runs
globally and scales the interval back instead of disabling it.

Fix
Route both hooks through the same checkPendingRuns: true mechanism
already used elsewhere, instead of their own divergent, page-local gate.
No visual/markup changes — purely a polling-behavior fix.

closes: #70663

Was generative AI tooling used to co-author this PR?

  • Yes - Claude

Generated-by: Claude following the guidelines

@bbovenzi bbovenzi added this to the Airflow 3.3.2 milestone Aug 13, 2026
@bbovenzi
bbovenzi merged commit a19c3dd into apache:main Aug 13, 2026
89 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-3-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
❌ v3-3-test Commit Link

You can attempt to backport this manually by running:

cherry_picker a19c3dd v3-3-test

This should apply the commit to the v3-3-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

pierrejeambrun pushed a commit that referenced this pull request Sep 9, 2026
…70667) (#72735)

* Fix DAGs list page Last Run/Next Run going stale after runs complete

* Address review: back off refetch 10x instead of disabling, drop redundant comment

* fix(ui): pass `dags` to useDagRunStateCounts to fix TS2345 in DagsList

(cherry picked from commit a19c3dd)

# Conflicts:
#	airflow-core/src/airflow/ui/src/queries/useDagRunStateCounts.tsx

Co-authored-by: Bramhanand Lingala <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DAGs list page "Last Run" and "Next Run" columns not updating

2 participants