bbovenzi commented on code in PR #63372:
URL: https://github.com/apache/airflow/pull/63372#discussion_r3053088719


##########
airflow-core/src/airflow/ui/src/layouts/Details/Gantt/utils.ts:
##########
@@ -122,22 +122,57 @@ export const transformGanttData = ({
         if (tries && tries.length > 0) {
           return tries
             .filter((tryInstance) => tryInstance.start_date !== null)
-            .map((tryInstance) => {
+            .flatMap((tryInstance) => {
               const hasTaskRunning = isStatePending(tryInstance.state);
               const endTime =
                 hasTaskRunning || tryInstance.end_date === null
                   ? dayjs().toISOString()
                   : tryInstance.end_date;
-
-              return {
+              const items: Array<GanttDataItem> = [];
+
+              // Scheduled segment: from scheduled_dttm to queued_dttm (or 
start_date if no queued_dttm)
+              if (tryInstance.scheduled_dttm !== null) {
+                const scheduledEnd = tryInstance.queued_dttm ?? 
tryInstance.start_date;

Review Comment:
   queued_dttm and start_date can be null so we need to handle that before 
passing it to dayjs()
   
   Let's make sure to resolve them to undefined so we dont get errors.



##########
airflow-core/src/airflow/ui/src/layouts/Details/Gantt/utils.ts:
##########


Review Comment:
   We need to update the utils.test.ts file here too



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to