Dag Run and Overview Tab Display Deadlines#62195
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.
|
@pierrejeambrun this is the PR to actually implement that endpoint you modified in #62374, if you can review when you get time. |
|
@imrichardwu - As I mentioned on Slack, I love how this looks in the screenshot, but the typescript/React stuff is well outside of my comfort zone to approve so I'll leave that for the others. The rendered result looks great to me though! |
pierrejeambrun
left a comment
There was a problem hiding this comment.
Nice PR.
Overall looking good. Just a few suggestions/improvements.
|
I am struggling to understand the UX here.
Let me work on an issue for AIP-86's UI to make sure we are thinking this all through and developing enough API endpoints to support it. |
I don't see user having more than a couple. I don't know what the actual average number will be, but my expectation is under 5. That's why I didn't think the pagination was a major miss in his original code, but it can't hurt to have either way. The rest are UI/UX questions which aren't really my forte, I'll let you artists sort that part out, but I'll keep an eye here in case I can help at all. |
|
I wrote up my thoughts over in AIP-86 UI issue. |
5d348eb to
6c32415
Compare
- Introduce CalendarDeadlines component to display deadlines in the calendar view. - Implement DeadlineAlertsBadge to show alerts related to deadlines in the DAG header. - Create DagDeadlines component for overview page to list upcoming and missed deadlines. - Add DeadlineStatus component to show the status of deadlines in the run details. - Enhance i18n support for new deadline-related strings in dag.json.
600cb9c to
fd76b5b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
airflow-core/src/airflow/serialization/encoders.py:170
- This PR is focused on UI changes for displaying DAG run deadlines, but it also modifies core trigger serialization behavior. Since this change is unrelated to the stated scope and could have broad impact on DAG serialization/deserialization, it would be safer to either justify the necessity in the PR description or move it into a separate PR with its own tests/validation.
def encode_trigger(trigger: BaseEventTrigger | dict):
from airflow.serialization.serialized_objects import BaseSerialization
def _ensure_serialized(d):
"""
Make sure the kwargs dict is JSON-serializable.
This is done with BaseSerialization logic. A simple check is added to
ensure we don't double-serialize, which is possible when a trigger goes
through multiple serialization layers.
"""
if isinstance(d, dict) and Encoding.TYPE in d:
return d
return BaseSerialization.serialize(d)
if isinstance(trigger, dict):
classpath = trigger["classpath"]
kwargs = trigger["kwargs"]
else:
classpath, kwargs = trigger.serialize()
return {
"classpath": classpath,
"kwargs": {k: _ensure_serialized(v) for k, v in kwargs.items()},
}
8e1fcaa to
a425539
Compare
bbovenzi
left a comment
There was a problem hiding this comment.
I don't think we want to use humanize for the duration. The number of seconds is important. Instead let's go with the Expected/Actual date idea below where we can give a quick duration next to the Actual date

When we have more than one deadline. We probably just want to have a badge saying (3 Missed Deadlines) with the ability to click on it for more info. Otherwise the header gets stretched too much.

Also, for a Met deadline. I think we should still have a description in a tooltip.
bbovenzi
left a comment
There was a problem hiding this comment.
A few more UX comments.
Co-authored-by: Brent Bovenzi <brent.bovenzi@gmail.com>
…improved UI layout
bbovenzi
left a comment
There was a problem hiding this comment.
Ok I think this is good! We can always refine this later but let's get this merged.
PR scope change, so the branch name is a bit odd, but that's ok.
Implemented Dag run UI and Overview Tab base on the detail's at this PR(#50501 (comment))


Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.