This is an automated email from the ASF dual-hosted git repository.
pierrejeambrun pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-2-test by this push:
new 319bc902261 fix(ui): guard against null/undefined dates in Gantt chart
to prevent RangeError (#64031) (#64489)
319bc902261 is described below
commit 319bc9022614d326c11c4d08a875499cbcad8878
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Mon Mar 30 18:04:17 2026 +0200
fix(ui): guard against null/undefined dates in Gantt chart to prevent
RangeError (#64031) (#64489)
* fix(ui): guard against null/undefined dates in Gantt chart to prevent
RangeError
Closes: #63954
* Fix strict-boolean-expressions lint error in Gantt utils
(cherry picked from commit 92255b513f724bde79ccf5c97451c7ce3425d6c0)
Co-authored-by: Idris Akorede Ibrahim <[email protected]>
---
airflow-core/src/airflow/ui/src/layouts/Details/Gantt/utils.ts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/airflow-core/src/airflow/ui/src/layouts/Details/Gantt/utils.ts
b/airflow-core/src/airflow/ui/src/layouts/Details/Gantt/utils.ts
index b2a54fa7d7e..22df4eb28cf 100644
--- a/airflow-core/src/airflow/ui/src/layouts/Details/Gantt/utils.ts
+++ b/airflow-core/src/airflow/ui/src/layouts/Details/Gantt/utils.ts
@@ -124,7 +124,10 @@ export const transformGanttData = ({
.filter((tryInstance) => tryInstance.start_date !== null)
.map((tryInstance) => {
const hasTaskRunning = isStatePending(tryInstance.state);
- const endTime = hasTaskRunning ? dayjs().toISOString() :
tryInstance.end_date;
+ const endTime =
+ hasTaskRunning || tryInstance.end_date === null
+ ? dayjs().toISOString()
+ : tryInstance.end_date;
return {
isGroup: false,