Skip to content

[v3-2-test] Fix Gantt view "Error invalid date" on running DagRun (#64752)#64853

Merged
bbovenzi merged 1 commit intov3-2-testfrom
backport-0b2efb9-v3-2-test
Apr 7, 2026
Merged

[v3-2-test] Fix Gantt view "Error invalid date" on running DagRun (#64752)#64853
bbovenzi merged 1 commit intov3-2-testfrom
backport-0b2efb9-v3-2-test

Conversation

@github-actions
Copy link
Copy Markdown

@github-actions github-actions bot commented Apr 7, 2026

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

…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>
@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Apr 7, 2026
@bbovenzi bbovenzi marked this pull request as ready for review April 7, 2026 17:51
@bbovenzi bbovenzi merged commit 1514e29 into v3-2-test Apr 7, 2026
77 checks passed
@bbovenzi bbovenzi deleted the backport-0b2efb9-v3-2-test branch April 7, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants