smyjt commented on code in PR #63372:
URL: https://github.com/apache/airflow/pull/63372#discussion_r3063784235
##########
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:
Added ?? undefined when passing start_date to dayjs() in the queued segment
to safely handle null
--
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]