feat: surface failed-run and missed-deadline indicators in the Grid view and add Deadlines tab to DAG run detail#62188
Closed
imrichardwu wants to merge 6 commits intoapache:mainfrom
Closed
feat: surface failed-run and missed-deadline indicators in the Grid view and add Deadlines tab to DAG run detail#62188imrichardwu wants to merge 6 commits intoapache:mainfrom
imrichardwu wants to merge 6 commits intoapache:mainfrom
Conversation
This commit introduces a new `FailedIcon` component for representing failure states in the UI, along with a plugin for the DurationChart that visually indicates failed indices. The `FailedIcon` is created using Chakra UI's icon system, while the plugin draws a custom icon on the chart for failed data points.
- Introduced a new DeadlinesService to fetch deadlines for specific DAG runs. - Added a new endpoint to the OpenAPI specification for retrieving DAG run deadlines. - Created a Deadlines component to display deadlines in a table format with sorting and filtering options. - Integrated a DeadlineIcon to visually indicate missed deadlines in the Gantt chart. - Updated the UI to include a new tab for deadlines in the DAG run details page. - Enhanced the existing services and types to accommodate the new deadlines feature. - Added translations for deadlines-related UI elements.
Contributor
|
Suggestion: can you split your PR into 2? One for the back-end, one for the front-end? It would make it easier to review, plus, very often back-end and front-end are not reviewed by the same persons so that way you get "specialized" reviews on back-end and front-end :) |
Contributor
Author
here is the pr for the backend: #62189 |
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.
This PR adds two complementary pieces of UI feedback for DAG runs in the Grid view:
Failed-run indicator – a warning icon (triangle with "!") is rendered above the
duration bar for any run whose state is
failed. Clicking the icon navigates directlyto the run detail page (task-instances view), letting operators drill in without first
having to select the bar.
Missed-deadline indicator – a clock/deadline icon is rendered above the duration bar
(stacked above the failed icon when both apply) for any run that has at least one missed
deadline. Clicking it navigates to the new Deadlines tab described below.
Backend changes
GridRunsResponse(datamodel) gains ahas_missed_deadline: boolfield so the gridendpoint can communicate per-run deadline status without an extra round-trip.
deadlines_routeris mounted at/ui/deadlines/{dag_id}/{run_id}.The endpoint fetches all
Deadlinerows for the given DAG run (joined with the associatedDeadlineAlertfor name/description), orders them bydeadline_time, and returns a listof
DeadlineResponseobjects.DeadlineResponseexposes:id,deadline_time,missed,created_at,alert_name(nullable),alert_description(nullable)._private_ui.yaml) is updated accordingly, and the generatedTypeScript client is regenerated.
Frontend changes
FailedIcon– new ChakracreateIconSVG component (warning triangle) for React usage.DeadlineIcon– new ChakracreateIconSVG component (clock) for React usage.failedIconPlugin– Chart.js plugin that draws warning triangles on the canvas abovefailed bars inside
DurationChart. (The canvas plugin path is kept separate from theReact icon because Chart.js operates on a
<canvas>element.)Bar(Grid/Bar.tsx) – renders theFailedIconand/orDeadlineIconas absolute-positioned ghost buttons above each bar, with dynamic vertical offsets so the icons
never overlap the bar or each other.
Deadlinespage (pages/Run/Deadlines.tsx) – sortable, filterable table of deadlinesfor a DAG run. Columns: alert name, deadline time, status (Missed / On Track badge),
created at, description. A checkbox filters to missed deadlines only.
Rundetail view are updated to include the newdeadlinestab route.Was generative AI tooling used to co-author this PR?
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.