Skip to content

[v3-3-test] Show larger dag run and task instance counts on the dashboard (#70892) - #71008

Merged
vatsrahul1001 merged 1 commit into
v3-3-testfrom
backport-b316afb-v3-3-test
Aug 4, 2026
Merged

[v3-3-test] Show larger dag run and task instance counts on the dashboard (#70892)#71008
vatsrahul1001 merged 1 commit into
v3-3-testfrom
backport-b316afb-v3-3-test

Conversation

@github-actions

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

Copy link
Copy Markdown
Contributor

The dashboard counted each state separately with a limit of 1000, so any busy state
showed "1000+" instead of a real number. On a large install almost every state sat at
the cap, leaving the panel with no usable figures at all.

Count the window in a single scan instead. When it fits, every count is exact. When it
does not, report what was read as a lower bound, rounded down, which stays far closer
to the real volume than a fixed cap. Dag runs and task instances are judged separately,
since a window often holds few enough dag runs to count exactly while holding far too
many task instances.

Counting a bounded number of rows is also cheaper than the old per-state limits, which
scanned the whole window for any state that could not fill its own limit (postgres, 12M
task instances):

window before after
15min 15 ms 4 ms
24h 3,270 ms 45 ms
7d 20,752 ms 46 ms

MySQL and SQLite show the same pattern.

The Dags list keeps its previous capped counts and now owns that constant.
(cherry picked from commit b316afb)

Co-authored-by: Jed Cunningham 66968678+jedcunningham@users.noreply.github.com

…oard (#70892)

The dashboard counted each state separately with a limit of 1000, so any busy state
showed "1000+" instead of a real number. On a large install almost every state sat at
the cap, leaving the panel with no usable figures at all.

Count the window in a single scan instead. When it fits, every count is exact. When it
does not, report what was read as a lower bound, rounded down, which stays far closer
to the real volume than a fixed cap. Dag runs and task instances are judged separately,
since a window often holds few enough dag runs to count exactly while holding far too
many task instances.

Counting a bounded number of rows is also cheaper than the old per-state limits, which
scanned the whole window for any state that could not fill its own limit (postgres, 12M
task instances):

  window   before      after
  15min       15 ms      4 ms
  24h      3,270 ms     45 ms
  7d      20,752 ms     46 ms

MySQL and SQLite show the same pattern.

The Dags list keeps its previous capped counts and now owns that constant.
(cherry picked from commit b316afb)

Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
@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
@vatsrahul1001
vatsrahul1001 marked this pull request as ready for review August 4, 2026 11:55
@vatsrahul1001 vatsrahul1001 added the type:misc/internal Changelog: Misc changes that should appear in change log label Aug 4, 2026
@vatsrahul1001
vatsrahul1001 merged commit 44a31fa into v3-3-test Aug 4, 2026
170 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-b316afb-v3-3-test branch August 4, 2026 14:00
vatsrahul1001 pushed a commit that referenced this pull request Aug 5, 2026
…oard (#70892) (#71008)

The dashboard counted each state separately with a limit of 1000, so any busy state
showed "1000+" instead of a real number. On a large install almost every state sat at
the cap, leaving the panel with no usable figures at all.

Count the window in a single scan instead. When it fits, every count is exact. When it
does not, report what was read as a lower bound, rounded down, which stays far closer
to the real volume than a fixed cap. Dag runs and task instances are judged separately,
since a window often holds few enough dag runs to count exactly while holding far too
many task instances.

Counting a bounded number of rows is also cheaper than the old per-state limits, which
scanned the whole window for any state that could not fill its own limit (postgres, 12M
task instances):

  window   before      after
  15min       15 ms      4 ms
  24h      3,270 ms     45 ms
  7d      20,752 ms     46 ms

MySQL and SQLite show the same pattern.

The Dags list keeps its previous capped counts and now owns that constant.
(cherry picked from commit b316afb)

Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
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. type:misc/internal Changelog: Misc changes that should appear in change log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants