From 04011f329ea006abdfa2d7c644eff1b10c9dc27b Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Thu, 12 Dec 2024 09:59:29 +0530 Subject: [PATCH] Fetch recent dag runs using dag id instead of dag display pattern. (#44861) --- airflow/ui/src/pages/Dag/Dag.tsx | 2 +- airflow/ui/src/pages/Dag/Tasks/Tasks.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/airflow/ui/src/pages/Dag/Dag.tsx b/airflow/ui/src/pages/Dag/Dag.tsx index 87283b077d1e6..03f1b17df07bb 100644 --- a/airflow/ui/src/pages/Dag/Dag.tsx +++ b/airflow/ui/src/pages/Dag/Dag.tsx @@ -50,7 +50,7 @@ export const Dag = () => { data: runsData, error: runsError, isLoading: isLoadingRuns, - } = useDagsServiceRecentDagRuns({ dagIdPattern: dagId }, undefined, { + } = useDagsServiceRecentDagRuns({ dagIds: [dagId] }, undefined, { enabled: Boolean(dagId), }); diff --git a/airflow/ui/src/pages/Dag/Tasks/Tasks.tsx b/airflow/ui/src/pages/Dag/Tasks/Tasks.tsx index 4b76110099e15..cfc4eb3f2fbcd 100644 --- a/airflow/ui/src/pages/Dag/Tasks/Tasks.tsx +++ b/airflow/ui/src/pages/Dag/Tasks/Tasks.tsx @@ -69,9 +69,8 @@ export const Tasks = () => { dagId, }); - // TODO: Replace dagIdPattern with dagId once supported for better matching const { data: runsData } = useDagsServiceRecentDagRuns( - { dagIdPattern: dagId, dagRunsLimit: 14 }, + { dagIds: [dagId], dagRunsLimit: 14 }, undefined, { enabled: Boolean(dagId),