You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2025/05/21 13:37:17 UTC

(airflow) branch v3-0-test updated: [v3-0-test] make dag_run nullable in Details page (#50719) (#50817)

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

potiuk pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-0-test by this push:
     new c705d674706 [v3-0-test] make dag_run nullable in Details page (#50719) (#50817)
c705d674706 is described below

commit c705d674706133a4168c09e51e5b2704ba4328c4
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Wed May 21 15:37:11 2025 +0200

    [v3-0-test] make dag_run nullable in Details page (#50719) (#50817)
    
    (cherry picked from commit e6282e0e654dfb26b58ae741a5654fc31f4e08a5)
    
    Co-authored-by: ayush3singh <ye...@gmail.com>
---
 .../src/airflow/api_fastapi/core_api/datamodels/dag_run.py    |  2 +-
 .../src/airflow/api_fastapi/core_api/openapi/_private_ui.yaml |  6 ++++--
 .../api_fastapi/core_api/openapi/v1-rest-api-generated.yaml   |  6 ++++--
 .../src/airflow/ui/openapi-gen/requests/schemas.gen.ts        | 11 +++++++++--
 airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts |  2 +-
 airflow-core/src/airflow/ui/src/pages/Run/Details.tsx         |  2 +-
 airflow-ctl/src/airflowctl/api/datamodels/generated.py        |  2 +-
 7 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py
index 49661dfd5db..eb3898f955e 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py
@@ -73,7 +73,7 @@ class DAGRunResponse(BaseModel):
     run_type: DagRunType
     state: DagRunState
     triggered_by: DagRunTriggeredByType | None
-    conf: dict
+    conf: dict | None
     note: str | None
     dag_versions: list[DagVersionResponse]
     bundle_version: str | None
diff --git a/airflow-core/src/airflow/api_fastapi/core_api/openapi/_private_ui.yaml b/airflow-core/src/airflow/api_fastapi/core_api/openapi/_private_ui.yaml
index 5eead52583d..c59d75f0f5d 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/openapi/_private_ui.yaml
+++ b/airflow-core/src/airflow/api_fastapi/core_api/openapi/_private_ui.yaml
@@ -934,8 +934,10 @@ components:
           - $ref: '#/components/schemas/DagRunTriggeredByType'
           - type: 'null'
         conf:
-          additionalProperties: true
-          type: object
+          anyOf:
+          - additionalProperties: true
+            type: object
+          - type: 'null'
           title: Conf
         note:
           anyOf:
diff --git a/airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml b/airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml
index b596b3f9fab..fd9889d4bcd 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml
+++ b/airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml
@@ -8231,8 +8231,10 @@ components:
           - $ref: '#/components/schemas/DagRunTriggeredByType'
           - type: 'null'
         conf:
-          additionalProperties: true
-          type: object
+          anyOf:
+          - additionalProperties: true
+            type: object
+          - type: 'null'
           title: Conf
         note:
           anyOf:
diff --git a/airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts b/airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
index 71358efef67..809715e9037 100644
--- a/airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
+++ b/airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
@@ -2247,8 +2247,15 @@ export const $DAGRunResponse = {
       ],
     },
     conf: {
-      additionalProperties: true,
-      type: "object",
+      anyOf: [
+        {
+          additionalProperties: true,
+          type: "object",
+        },
+        {
+          type: "null",
+        },
+      ],
       title: "Conf",
     },
     note: {
diff --git a/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts b/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts
index ba8bbb28d2d..d3dccd5f902 100644
--- a/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts
+++ b/airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts
@@ -577,7 +577,7 @@ export type DAGRunResponse = {
   triggered_by: DagRunTriggeredByType | null;
   conf: {
     [key: string]: unknown;
-  };
+  } | null;
   note: string | null;
   dag_versions: Array<DagVersionResponse>;
   bundle_version: string | null;
diff --git a/airflow-core/src/airflow/ui/src/pages/Run/Details.tsx b/airflow-core/src/airflow/ui/src/pages/Run/Details.tsx
index 44b1035cbfa..43140625fbe 100644
--- a/airflow-core/src/airflow/ui/src/pages/Run/Details.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Run/Details.tsx
@@ -145,7 +145,7 @@ export const Details = () => {
             <Table.Row>
               <Table.Cell>Run Config</Table.Cell>
               <Table.Cell>
-                <RenderedJsonField content={dagRun.conf} />
+                <RenderedJsonField content={dagRun.conf ?? {}} />
               </Table.Cell>
             </Table.Row>
           </Table.Body>
diff --git a/airflow-ctl/src/airflowctl/api/datamodels/generated.py b/airflow-ctl/src/airflowctl/api/datamodels/generated.py
index 81c1066495d..4c790551c78 100644
--- a/airflow-ctl/src/airflowctl/api/datamodels/generated.py
+++ b/airflow-ctl/src/airflowctl/api/datamodels/generated.py
@@ -1219,7 +1219,7 @@ class DAGRunResponse(BaseModel):
     run_type: DagRunType
     state: DagRunState
     triggered_by: DagRunTriggeredByType | None = None
-    conf: Annotated[dict[str, Any], Field(title="Conf")]
+    conf: Annotated[dict[str, Any] | None, Field(title="Conf")] = None
     note: Annotated[str | None, Field(title="Note")] = None
     dag_versions: Annotated[list[DagVersionResponse], Field(title="Dag Versions")]
     bundle_version: Annotated[str | None, Field(title="Bundle Version")] = None