This is an automated email from the ASF dual-hosted git repository.

tirkarthi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 1c983b5b250 Autorefresh dagrun breadcrumb state when dagrun is in 
pending state. (#49328)
1c983b5b250 is described below

commit 1c983b5b2507de1189fdaf04b99a8e3226319252
Author: Karthikeyan Singaravelan <[email protected]>
AuthorDate: Wed Apr 16 19:58:31 2025 +0530

    Autorefresh dagrun breadcrumb state when dagrun is in pending state. 
(#49328)
---
 airflow-core/src/airflow/ui/src/layouts/Details/DagBreadcrumb.tsx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/airflow-core/src/airflow/ui/src/layouts/Details/DagBreadcrumb.tsx 
b/airflow-core/src/airflow/ui/src/layouts/Details/DagBreadcrumb.tsx
index bdc4659d047..610666e4ced 100644
--- a/airflow-core/src/airflow/ui/src/layouts/Details/DagBreadcrumb.tsx
+++ b/airflow-core/src/airflow/ui/src/layouts/Details/DagBreadcrumb.tsx
@@ -28,9 +28,11 @@ import { BreadcrumbStats } from 
"src/components/BreadcrumbStats";
 import { StateBadge } from "src/components/StateBadge";
 import Time from "src/components/Time";
 import { TogglePause } from "src/components/TogglePause";
+import { isStatePending, useAutoRefresh } from "src/utils";
 
 export const DagBreadcrumb = () => {
   const { dagId = "", mapIndex = "-1", runId, taskId } = useParams();
+  const refetchInterval = useAutoRefresh({ dagId });
 
   const { data: dag } = useDagServiceGetDagDetails({
     dagId,
@@ -44,6 +46,7 @@ export const DagBreadcrumb = () => {
     undefined,
     {
       enabled: Boolean(runId),
+      refetchInterval: (query) => (isStatePending(query.state.data?.state) ? 
refetchInterval : false),
     },
   );
 

Reply via email to