[v3-2-test] Fix Gantt view "Error invalid date" on running DagRun (#64752)#64853
Merged
[v3-2-test] Fix Gantt view "Error invalid date" on running DagRun (#64752)#64853
Conversation
…4752) * Fix Gantt view "Error invalid date" on running DagRun (#64599) The Gantt chart scale calculation used new Date() to parse date strings, which fails for non-UTC timezone abbreviations, returning NaN and crashing Chart.js's time scale. Changes: - Replace new Date().getTime() with dayjs().valueOf() for reliable date parsing in the x-axis scale min/max calculations. - Add unit tests for Gantt chart scale calculations and data transformation covering completed tasks, running tasks with null end dates, groups with null dates, and ISO date string validity. * Address review feedback: fix static checks and consistency - Fix object property ordering in test data (alphabetical) - Import vi as type-only from vitest - Fix duration field position in selectedRun objects - Make dayjs null handling consistent between max and min scale calculations (remove unnecessary ?? undefined) * Fix ESLint no-empty-function error in Gantt utils test * Fix TypeScript type errors in Gantt utils tests Update test fixtures to match current generated types: - Add has_missed_deadline to GridRunsResponse objects - Remove dag_id and map_index from GanttTaskInstance objects - Add depth to GridTask objects - Add task_display_name to LightGridTaskInstanceSummary objects * Fix translate type to use TFunction in Gantt utils tests (cherry picked from commit 0b2efb9) Co-authored-by: Ashir Alam <alamashir@gmail.com>
5 tasks
bbovenzi
approved these changes
Apr 7, 2026
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 chart scale calculation used new Date() to parse date strings,
which fails for non-UTC timezone abbreviations, returning NaN and
crashing Chart.js's time scale.
Changes:
parsing in the x-axis scale min/max calculations.
transformation covering completed tasks, running tasks with null end
dates, groups with null dates, and ISO date string validity.
calculations (remove unnecessary ?? undefined)
Fix ESLint no-empty-function error in Gantt utils test
Fix TypeScript type errors in Gantt utils tests
Update test fixtures to match current generated types:
(cherry picked from commit 0b2efb9)
Co-authored-by: Ashir Alam alamashir@gmail.com