Skip to content

Commit

Permalink
Use updated data from Dags API for Dag with recent DagRun.
Browse files Browse the repository at this point in the history
  • Loading branch information
tirkarthi committed Nov 10, 2024
1 parent cf3f9c7 commit e895257
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion airflow/ui/src/queries/useDags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ export const useDags = (
(runsDag) => runsDag.dag_id === dag.dag_id,
);

return dagWithRuns ?? { ...dag, latest_dag_runs: [] };
// For dags with recent dag runs replace the dag data from useDagsServiceRecentDagRuns
// which might be stale with updated dag data from useDagServiceGetDags
return dagWithRuns
? { ...dagWithRuns, ...dag }
: { ...dag, latest_dag_runs: [] };
});

return {
Expand Down

0 comments on commit e895257

Please sign in to comment.