This is an automated email from the ASF dual-hosted git repository.
vatsrahul1001 pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-3-test by this push:
new 7749f2f58fa UI: Label Dag active runs accurately (#72371) (#72722)
7749f2f58fa is described below
commit 7749f2f58faf204bef2e1166bb3f809db441cd32
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Tue Sep 8 19:21:17 2026 +0200
UI: Label Dag active runs accurately (#72371) (#72722)
The configured maximum is a limit rather than the metric displayed in the
header, so the previous label made the ratio ambiguous.
(cherry picked from commit b916de6dab0a34e6ff80a9e54e68c5b5b68ebcb9)
Co-authored-by: Sebastián Ortega <[email protected]>
---
.../src/airflow/api_fastapi/core_api/routes/public/dags.py | 2 +-
.../src/airflow/ui/public/i18n/locales/ca/common.json | 1 +
.../src/airflow/ui/public/i18n/locales/en/common.json | 1 +
.../src/airflow/ui/public/i18n/locales/es/common.json | 1 +
.../src/airflow/ui/public/i18n/locales/fr/common.json | 1 +
.../src/airflow/ui/public/i18n/locales/pt/common.json | 1 +
airflow-core/src/airflow/ui/src/pages/Dag/Header.test.tsx | 11 +++++++++++
airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx | 2 +-
8 files changed, 18 insertions(+), 2 deletions(-)
diff --git
a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/dags.py
b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/dags.py
index 0315a06c7ed..240c93220b1 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/dags.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/dags.py
@@ -245,7 +245,7 @@ def get_dag_details(
is not None
)
- # Count active (running + queued) Dag runs for this Dag
+ # Count only running Dag runs: this stat shows runs that are actually
executing right now.
active_runs_count = (
session.scalar(
select(func.count())
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/ca/common.json
b/airflow-core/src/airflow/ui/public/i18n/locales/ca/common.json
index 8ac5f4df69d..64bcd4ef48a 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/ca/common.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/ca/common.json
@@ -38,6 +38,7 @@
"dag_one": "Dag",
"dag_other": "Dags",
"dagDetails": {
+ "activeRuns": "Execucions actives",
"catchup": "Recuperar (catchup)",
"dagRunTimeout": "Temps d'espera de l'execució del Dag",
"defaultArgs": "Arguments per defecte",
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json
b/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json
index 671aa051c4e..26669cdf8f1 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/en/common.json
@@ -38,6 +38,7 @@
"dag_one": "Dag",
"dag_other": "Dags",
"dagDetails": {
+ "activeRuns": "Active Runs",
"catchup": "Catchup",
"dagRunTimeout": "Dag Run Timeout",
"defaultArgs": "Default Args",
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/es/common.json
b/airflow-core/src/airflow/ui/public/i18n/locales/es/common.json
index d84ff40f359..95f39cc7346 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/es/common.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/es/common.json
@@ -43,6 +43,7 @@
"dag_one": "Dag",
"dag_other": "Dags",
"dagDetails": {
+ "activeRuns": "Ejecuciones Activas",
"catchup": "Catchup",
"dagRunTimeout": "Tiempo de Ejecución del Dag",
"defaultArgs": "Argumentos por Defecto",
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/fr/common.json
b/airflow-core/src/airflow/ui/public/i18n/locales/fr/common.json
index 9e15817e462..87d20585905 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/fr/common.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/fr/common.json
@@ -43,6 +43,7 @@
"dag_one": "Dag",
"dag_other": "Dags",
"dagDetails": {
+ "activeRuns": "Exécutions actives",
"catchup": "Rattrapage",
"dagRunTimeout": "Délai d'exécution du Dag",
"defaultArgs": "Arguments par défaut",
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/pt/common.json
b/airflow-core/src/airflow/ui/public/i18n/locales/pt/common.json
index 4bcb621e3e1..6318facc66b 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/pt/common.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/pt/common.json
@@ -43,6 +43,7 @@
"dag_other": "Dags",
"dag_zero": "Nenhum Dag",
"dagDetails": {
+ "activeRuns": "Execuções Ativas",
"catchup": "Catchup",
"dagRunTimeout": "Tempo Limite da Execução do Dag",
"defaultArgs": "Argumentos Padrão",
diff --git a/airflow-core/src/airflow/ui/src/pages/Dag/Header.test.tsx
b/airflow-core/src/airflow/ui/src/pages/Dag/Header.test.tsx
index 4be93388cca..c9426afc4fc 100644
--- a/airflow-core/src/airflow/ui/src/pages/Dag/Header.test.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Dag/Header.test.tsx
@@ -71,4 +71,15 @@ describe("Header", () => {
expect(screen.getByText(i18n.t("dag:dagDetails.nextRun"))).toBeInTheDocument();
expect(screen.queryByText("2024-08-22 19:00:00")).not.toBeInTheDocument();
});
+
+ it("shows active runs against the maximum number of active runs", () => {
+ render(
+ <Wrapper>
+ <Header dag={{ ...mockDag, active_runs_count: 2, max_active_runs: 2 }}
/>
+ </Wrapper>,
+ );
+
+
expect(screen.getByText(i18n.t("common:dagDetails.activeRuns"))).toBeInTheDocument();
+ expect(screen.getByText("2 of 2")).toBeInTheDocument();
+ });
});
diff --git a/airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx
b/airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx
index 419db668c81..0b4cb76d0e0 100644
--- a/airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx
@@ -106,7 +106,7 @@ export const Header = ({
},
...nextRunStat,
{
- label: translate("dagDetails.maxActiveRuns"),
+ label: translate("dagDetails.activeRuns"),
value:
dag?.max_active_runs === undefined
? undefined