Skip to content

UI: Add a slowest tasks chart to the Dag Overview - #70305

Merged
bbovenzi merged 3 commits into
apache:mainfrom
eddiesr93:improve-62935-slowest-tasks-chart
Jul 28, 2026
Merged

bbovenzi merged 3 commits into
apache:mainfrom
eddiesr93:improve-62935-slowest-tasks-chart

Conversation

@eddiesr93

@eddiesr93 eddiesr93 commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Adds a Slowest task instances chart to the Dag Overview tab: the ten
longest-running task instances in the selected time range, coloured by state.
Discussed in #62935, where adding more charts to the Overview tab was encouraged.

Data comes from the existing task-instances endpoint, sorted by duration by the
API; no backend change and no client-side aggregation. Aggregating a median per
task is left for the custom /ui endpoint suggested in review.

The same task is often slow in more than one run, so each label carries the run
it belongs to.

Light and dark, real runs:

Slowest task instances, light mode

Slowest task instances, dark mode

Tooltip shows the full duration:

Tooltip with task, run and duration

In context next to the existing run-duration chart:

Dag Overview with both charts, light

Dag Overview with both charts, dark

A Dag with no completed instances in the range:

Empty state

related: #62935


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines


Drafted-by: Claude Code (Opus 4.8); reviewed by @eddiesr93 before posting

Finding which tasks dominate a Dag's runtime currently means opening the
Gantt or duration pages run by run. A ranked median-per-task view on the
Overview tab answers it at a glance, and stays readable for Dags with
thousands of tasks since it only shows the top ten.
@bbovenzi

Copy link
Copy Markdown
Contributor

Thanks so much! Let's either swap to "Slowest task instances" or create a custom API endpoint to provide us the data we need for "Slowest Tasks"

Review asked to defer per-task median aggregation to a future /ui
endpoint. Until then the chart lists individual task instances sorted
by the API rather than aggregating them client-side.
@eddiesr93

Copy link
Copy Markdown
Contributor Author

Swapped to individual task instances sorted by duration in the API, added the enabled check and moved the fallback through getComputedCSSVariableValue.

@bbovenzi

Copy link
Copy Markdown
Contributor

Thanks. Could you please update the screenshots in the description?

The chart lists individual instances, so one task can take several bars
with identical labels. Review asked for run timestamp information to
tell them apart.
@eddiesr93

Copy link
Copy Markdown
Contributor Author

Added the run timestamp under the task name. Screenshots updated.

@bbovenzi bbovenzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Thank you!

@bbovenzi bbovenzi modified the milestones: Airflow 3.4.0, Airflow 3.3.1 Jul 28, 2026
@bbovenzi
bbovenzi merged commit 87ac18b into apache:main Jul 28, 2026
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants