Skip to content

fix(ui): guard against null/undefined dates in Gantt chart to prevent RangeError#64031

Open
idrisakorede wants to merge 2 commits intoapache:mainfrom
idrisakorede:fix-63954
Open

fix(ui): guard against null/undefined dates in Gantt chart to prevent RangeError#64031
idrisakorede wants to merge 2 commits intoapache:mainfrom
idrisakorede:fix-63954

Conversation

@idrisakorede
Copy link
Contributor

Fix Grid View crash (RangeError: Invalid time value) when viewing tasks in non-terminal states (scheduled, running) with "Show Gantt" enabled. This is a regression from 3.1.7 introduced by #61250.

Root cause: dayjs(value).toISOString() is called on null/undefined date values for tasks that haven't completed yet.

Changes in utils.ts:

  • Group/mapped task guard: === null → falsy check (!value) to also catch undefined
  • Individual task tries: added !tryInstance.end_date fallback so null end dates use current time instead of crashing

No test coverage or behavior changes beyond the null guard. Tasks with missing end dates now render a bar extending to "now" (consistent with running task behavior).

closes: #63954


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Mar 21, 2026
@potiuk potiuk marked this pull request as draft March 23, 2026 17:20
@potiuk
Copy link
Member

potiuk commented Mar 23, 2026

@idrisakorede This PR has been converted to draft because it does not yet meet our Pull Request quality criteria.

Issues found:

  • Pre-commit / static checks: Failing: CI image checks / Static checks. Run prek run --from-ref main locally to find and fix issues. See Pre-commit / static checks docs.

What to do next:

  • The comment informs you what you need to do.
  • Fix each issue, then mark the PR as "Ready for review" in the GitHub UI - but only after making sure that all the issues are fixed.
  • There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates.
  • Maintainers will then proceed with a normal review.

Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack.

@bbovenzi bbovenzi marked this pull request as ready for review March 24, 2026 17:33
@eladkal eladkal added this to the Airflow 3.1.9 milestone Mar 24, 2026
@eladkal eladkal added type:bug-fix Changelog: Bug Fixes backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch labels Mar 24, 2026
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. backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Airflow 3.1.8 UI Crash: RangeError: Invalid time value in Grid View for Uncompleted Tasks

4 participants