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


##########
airflow/ui/src/pages/Dag/Runs/Runs.tsx:
##########
@@ -89,7 +89,10 @@ const columns: Array<ColumnDef<DAGRunResponse>> = [
   },
   {
     cell: ({ row: { original } }) =>
-      
`${dayjs.duration(dayjs(original.end_date).diff(original.start_date)).asSeconds().toFixed(2)}s`,
+      `${dayjs
+        .duration(dayjs(original.end_date ?? 
dayjs()).diff(original.start_date))
+        .asSeconds()
+        .toFixed(2)}s`,

Review Comment:
   Let's turn this into a reusable `getDuration(startDate, endDate)` util.
   
   Also, we can just do `end_date ?? undefined`. The problem is that dayjs() 
can't properly 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]

Reply via email to