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 e6282e0e654 make dag_run nullable in Details page (#50719)
e6282e0e654 is described below
commit e6282e0e654dfb26b58ae741a5654fc31f4e08a5
Author: ayush3singh <[email protected]>
AuthorDate: Tue May 20 14:49:54 2025 +0530
make dag_run nullable in Details page (#50719)
---
.../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/v2-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 966de7e78f7..367547a8d8e 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 c53a149e3a4..51fa49fea00 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
@@ -947,8 +947,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/v2-rest-api-generated.yaml
b/airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml
index 2d8f43b62e0..f6b7c8ce2c2 100644
---
a/airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml
+++
b/airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml
@@ -8464,8 +8464,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 8eb2b018270..c1f1cd6ab2e 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
@@ -2275,8 +2275,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 f00a56b4454..a2227f126f1 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
@@ -582,7 +582,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 f20ada86035..8a65fcafe67 100644
--- a/airflow-core/src/airflow/ui/src/pages/Run/Details.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Run/Details.tsx
@@ -151,7 +151,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 abc0ae5811b..0bf806c8bc0 100644
--- a/airflow-ctl/src/airflowctl/api/datamodels/generated.py
+++ b/airflow-ctl/src/airflowctl/api/datamodels/generated.py
@@ -1245,7 +1245,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