This is an automated email from the ASF dual-hosted git repository.
rom pushed a commit to branch v2-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-10-test by this push:
new 3f77a0a6d9 Always use logical date in DAG run header (#43148) (#43163)
3f77a0a6d9 is described below
commit 3f77a0a6d973183756706dd5ef7798b82e5f0074
Author: Tzu-ping Chung <[email protected]>
AuthorDate: Sat Oct 19 03:26:00 2024 +0800
Always use logical date in DAG run header (#43148) (#43163)
---
airflow/www/static/js/utils/index.test.ts | 8 ++++----
airflow/www/static/js/utils/index.ts | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/airflow/www/static/js/utils/index.test.ts
b/airflow/www/static/js/utils/index.test.ts
index a12f66b36c..569d3af98b 100644
--- a/airflow/www/static/js/utils/index.test.ts
+++ b/airflow/www/static/js/utils/index.test.ts
@@ -146,14 +146,14 @@ describe("Test getDagRunLabel", () => {
note: "someRandomValue",
} as DagRun;
- test("Defaults to dataIntervalStart", async () => {
+ test("Defaults to executionDate", async () => {
const runLabel = getDagRunLabel({ dagRun });
- expect(runLabel).toBe(dagRun.dataIntervalStart);
+ expect(runLabel).toBe(dagRun.executionDate);
});
test("Passing an order overrides default", async () => {
- const runLabel = getDagRunLabel({ dagRun, ordering: ["executionDate"] });
- expect(runLabel).toBe(dagRun.executionDate);
+ const runLabel = getDagRunLabel({ dagRun, ordering: ["dataIntervalEnd"] });
+ expect(runLabel).toBe(dagRun.dataIntervalEnd);
});
});
diff --git a/airflow/www/static/js/utils/index.ts
b/airflow/www/static/js/utils/index.ts
index 747ca474c7..87428ce836 100644
--- a/airflow/www/static/js/utils/index.ts
+++ b/airflow/www/static/js/utils/index.ts
@@ -169,7 +169,7 @@ interface RunLabelProps {
const getDagRunLabel = ({
dagRun,
- ordering = ["dataIntervalStart", "executionDate"],
+ ordering = ["executionDate"],
}: RunLabelProps) => dagRun[ordering[0]] ?? dagRun[ordering[1]];
const getStatusBackgroundColor = (color: string, hasNote: boolean) =>