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

pierrejeambrun 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 b916de6dab0 UI: Label Dag active runs accurately (#72371)
b916de6dab0 is described below

commit b916de6dab0a34e6ff80a9e54e68c5b5b68ebcb9
Author: Sebastián Ortega <[email protected]>
AuthorDate: Wed Sep 9 00:15:25 2026 +0900

    UI: Label Dag active runs accurately (#72371)
    
    The configured maximum is a limit rather than the metric displayed in the 
header, so the previous label made the ratio ambiguous.
---
 .../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 1b941c967dd..fd1516b99ef 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
@@ -255,7 +255,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 43025657615..99e181ff958 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
@@ -40,6 +40,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 4b8154fdc25..d7a2d3ad492 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
@@ -44,6 +44,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 dc79e170ba2..59f43093902 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
@@ -82,6 +82,17 @@ describe("Header", () => {
     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();
+  });
+
   it("shows the team alongside the owner when multi-team is enabled", () => {
     mockConfig.multi_team = true;
     render(
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 4d3fda3d73f..7417f12b5d7 100644
--- a/airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx
@@ -111,7 +111,7 @@ export const Header = ({
     },
     ...nextRunStat,
     {
-      label: translate("dagDetails.maxActiveRuns"),
+      label: translate("dagDetails.activeRuns"),
       value:
         dag?.max_active_runs === undefined
           ? undefined

Reply via email to