This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-1-test by this push:
new 741476629b1 [v3-1-test] Use start_date and end_date to calculate
duration when duration is null for running taskinstance (#61898) (#62136)
741476629b1 is described below
commit 741476629b1ca0412e0e64cfbf5b102fafd95c56
Author: Guan-Ming (Wesley) Chiu <[email protected]>
AuthorDate: Thu Feb 19 04:34:00 2026 +0800
[v3-1-test] Use start_date and end_date to calculate duration when duration
is null for running taskinstance (#61898) (#62136)
(cherry picked from commit edd97b440f334b9627d60fe753868726d91c15fa)
Co-authored-by: Karthikeyan Singaravelan <[email protected]>
---
airflow-core/src/airflow/ui/src/pages/TaskInstance/Header.tsx | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/airflow-core/src/airflow/ui/src/pages/TaskInstance/Header.tsx
b/airflow-core/src/airflow/ui/src/pages/TaskInstance/Header.tsx
index dfa18973120..8c91604d5b7 100644
--- a/airflow-core/src/airflow/ui/src/pages/TaskInstance/Header.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/TaskInstance/Header.tsx
@@ -30,7 +30,7 @@ import { HeaderCard } from "src/components/HeaderCard";
import { MarkTaskInstanceAsButton } from "src/components/MarkAs";
import Time from "src/components/Time";
import { usePatchTaskInstance } from "src/queries/usePatchTaskInstance";
-import { renderDuration, useContainerWidth } from "src/utils";
+import { getDuration, renderDuration, useContainerWidth } from "src/utils";
export const Header = ({ taskInstance }: { readonly taskInstance:
TaskInstanceResponse }) => {
const { t: translate } = useTranslation();
@@ -48,7 +48,14 @@ export const Header = ({ taskInstance }: { readonly
taskInstance: TaskInstanceRe
{ label: translate("startDate"), value: <Time
datetime={taskInstance.start_date} /> },
{ label: translate("endDate"), value: <Time
datetime={taskInstance.end_date} /> },
...(Boolean(taskInstance.start_date)
- ? [{ label: translate("duration"), value:
renderDuration(taskInstance.duration) }]
+ ? [
+ {
+ label: translate("duration"),
+ value: Boolean(taskInstance.duration)
+ ? renderDuration(taskInstance.duration)
+ : getDuration(taskInstance.start_date, taskInstance.end_date),
+ },
+ ]
: []),
{
label: translate("taskInstance.dagVersion"),