Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class DAGRunResponse(BaseModel):
conf: dict
note: str | None
dag_versions: list[DagVersionResponse]
bundle_version: str | None


class DAGRunCollectionResponse(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,11 @@ components:
$ref: '#/components/schemas/DagVersionResponse'
type: array
title: Dag Versions
bundle_version:
anyOf:
- type: string
- type: 'null'
title: Bundle Version
type: object
required:
- dag_run_id
Expand All @@ -958,6 +963,7 @@ components:
- conf
- note
- dag_versions
- bundle_version
title: DAGRunResponse
description: DAG Run serializer for responses.
DAGRunStates:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8337,6 +8337,11 @@ components:
$ref: '#/components/schemas/DagVersionResponse'
type: array
title: Dag Versions
bundle_version:
anyOf:
- type: string
- type: 'null'
title: Bundle Version
type: object
required:
- dag_run_id
Expand All @@ -8355,6 +8360,7 @@ components:
- conf
- note
- dag_versions
- bundle_version
title: DAGRunResponse
description: DAG Run serializer for responses.
DAGRunsBatchBody:
Expand Down
12 changes: 12 additions & 0 deletions airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2255,6 +2255,17 @@ export const $DAGRunResponse = {
type: "array",
title: "Dag Versions",
},
bundle_version: {
anyOf: [
{
type: "string",
},
{
type: "null",
},
],
title: "Bundle Version",
},
},
type: "object",
required: [
Expand All @@ -2274,6 +2285,7 @@ export const $DAGRunResponse = {
"conf",
"note",
"dag_versions",
"bundle_version",
],
title: "DAGRunResponse",
description: "DAG Run serializer for responses.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ export type DAGRunResponse = {
};
note: string | null;
dag_versions: Array<DagVersionResponse>;
bundle_version: string | null;
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,7 @@ def test_should_respond_200(self, test_client):
response = test_client.post("/assets/1/materialize")
assert response.status_code == 200
assert response.json() == {
"bundle_version": None,
"dag_run_id": mock.ANY,
"dag_id": self.DAG_ASSET1_ID,
"dag_versions": mock.ANY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def get_dag_versions_dict(dag_versions: list[DagVersion]) -> list[dict]:

def get_dag_run_dict(run: DagRun):
return {
"bundle_version": None,
"dag_run_id": run.run_id,
"dag_id": run.dag_id,
"logical_date": from_datetime_to_zulu_without_ms(run.logical_date),
Expand Down Expand Up @@ -1303,6 +1304,7 @@ def test_should_respond_200(
session.query(DagRun).where(DagRun.dag_id == DAG1_ID, DagRun.run_id == expected_dag_run_id).one()
)
expected_response_json = {
"bundle_version": None,
"conf": {},
"dag_id": DAG1_ID,
"dag_run_id": expected_dag_run_id,
Expand Down Expand Up @@ -1492,6 +1494,7 @@ def test_should_response_409_for_duplicate_logical_date(self, test_client):

assert response_1.status_code == 200
assert response_1.json() == {
"bundle_version": None,
"dag_run_id": RUN_ID_1,
"dag_id": DAG1_ID,
"dag_versions": mock.ANY,
Expand Down Expand Up @@ -1576,6 +1579,7 @@ def test_should_respond_200_with_null_logical_date(self, test_client):
)
assert response.status_code == 200
assert response.json() == {
"bundle_version": None,
"dag_run_id": mock.ANY,
"dag_id": DAG1_ID,
"dag_versions": mock.ANY,
Expand Down
1 change: 1 addition & 0 deletions airflow-core/tests/unit/cli/commands/test_asset_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def test_cli_assets_materialize(parser: ArgumentParser) -> None:

assert run_list[0] | undeterministic == undeterministic | {
"conf": {},
"bundle_version": None,
"dag_id": "asset1_producer",
"end_date": None,
"last_scheduling_decision": None,
Expand Down
1 change: 1 addition & 0 deletions airflow-ctl/src/airflowctl/api/datamodels/generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,7 @@ class DAGRunResponse(BaseModel):
conf: Annotated[dict[str, Any], Field(title="Conf")]
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


class DAGRunsBatchBody(BaseModel):
Expand Down
Loading