UI: Fix Gantt tooltip showing wrong end date on queued/scheduled bars#68570
Open
Aaryan123456679 wants to merge 2 commits into
Open
UI: Fix Gantt tooltip showing wrong end date on queued/scheduled bars#68570Aaryan123456679 wants to merge 2 commits into
Aaryan123456679 wants to merge 2 commits into
Conversation
The tooltip on the queued and scheduled segments of a Gantt bar reported the end of that segment (e.g. the moment queueing ended) as the task's End Date, instead of the task's actual end. This was a regression from the start-date fix in apache#68176, which made the Start Date consistent across segments but left the End Date per-segment. Carry the task's effective end (end_date, or "now" while running) on every segment of a try as `end_when`, mirroring `start_when`, and use it for the tooltip's End Date so all segments of a try report the same start and end. closes: apache#68174
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
Contributor
|
can you share before/after images? |
Author
@eladkal Pls find attached the screenshots. |
Author
|
Hi @eladkal , any update on this? |
pierrejeambrun
left a comment
Member
There was a problem hiding this comment.
Thanks @Aaryan123456679 — fix mirrors the existing start_when plumbing cleanly and the screenshots make the win obvious. One small nit on the new running-task test below.
pierrejeambrun
left a comment
Member
There was a problem hiding this comment.
One more thing on top of the test nit — the new end_when line is asymmetric with start_when in two ways that I think can be smoothed out together.
Address review: derive a single effectiveEndDate (the raw end_date, or "now" while a started task is still running) and gate end_when on it the same way start_when is gated on start_date. Finished tasks now keep the API's raw end_date string instead of a re-serialized dayjs timestamp, and the tryWhenForTooltip block no longer depends on endMs ordering. Pin the running-task test to a fixed "now" via fake timers.
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.


The Gantt tooltip showed the wrong End Date when hovering over the queued or scheduled segment of a task bar: it reported the end of that segment (e.g. the instant queueing ended) rather than the task's actual end.
This was a regression from #68176, which fixed the Start Date by carrying the task's real
start_dateon every segment of a try (start_when) but left the End Date derived from each segment's own bounds (max_end_date = segment.x[1]).This PR mirrors that approach for the end: each segment of a try now carries the task's effective end (
end_date, or "now" while the task is still running) asend_when, and the tooltip uses it for the End Date. As a result, the scheduled, queued, and execution bars of the same try all report a consistent Start Date, End Date, and duration.Tests added in
Gantt/utils.test.tsassert thatstart_when/end_whenare carried consistently across all segments of a finished task and of a running task.closes: #68174
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines