This is an automated email from the ASF dual-hosted git repository.
onikolas 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 623185f1077 Revert "AIP-86: Add `deadline` to `DagResponse` (#51698)"
(#53616)
623185f1077 is described below
commit 623185f1077765394ffe2ea9e3a5fbeeeb91c083
Author: D. Ferruzzi <[email protected]>
AuthorDate: Tue Jul 22 09:14:34 2025 -0700
Revert "AIP-86: Add `deadline` to `DagResponse` (#51698)" (#53616)
This reverts commit 7c31bb5a
---
.../api_fastapi/core_api/datamodels/dags.py | 2 -
.../api_fastapi/core_api/datamodels/deadline.py | 30 --------
.../api_fastapi/core_api/openapi/_private_ui.yaml | 33 ---------
.../core_api/openapi/v2-rest-api-generated.yaml | 41 -----------
.../src/airflow/cli/commands/dag_command.py | 1 -
.../airflow/ui/openapi-gen/requests/schemas.gen.ts | 82 +---------------------
.../airflow/ui/openapi-gen/requests/types.gen.ts | 15 ----
.../airflow/ui/src/pages/DagsList/DagCard.test.tsx | 1 -
.../core_api/routes/public/test_dags.py | 2 -
.../src/airflowctl/api/datamodels/generated.py | 13 ----
10 files changed, 3 insertions(+), 217 deletions(-)
diff --git a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dags.py
b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dags.py
index 9b06657220e..572b62b4818 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dags.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dags.py
@@ -35,7 +35,6 @@ from pydantic import (
from airflow.api_fastapi.core_api.base import BaseModel, StrictBaseModel
from airflow.api_fastapi.core_api.datamodels.dag_tags import DagTagResponse
from airflow.api_fastapi.core_api.datamodels.dag_versions import
DagVersionResponse
-from airflow.api_fastapi.core_api.datamodels.deadline import
DeadlineAlertResponse
from airflow.configuration import conf
from airflow.models.dag_version import DagVersion
@@ -68,7 +67,6 @@ class DAGResponse(BaseModel):
relative_fileloc: str | None
fileloc: str
description: str | None
- deadline: list[DeadlineAlertResponse] | None
timetable_summary: str | None
timetable_description: str | None
tags: list[DagTagResponse]
diff --git
a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/deadline.py
b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/deadline.py
deleted file mode 100644
index 704c218208e..00000000000
--- a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/deadline.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-from __future__ import annotations
-
-from datetime import timedelta
-
-from airflow.api_fastapi.core_api.base import BaseModel
-
-
-class DeadlineAlertResponse(BaseModel):
- """Deadline alert serializer for responses."""
-
- reference: str
- interval: timedelta
- callback: str
- callback_kwargs: dict | None = 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 8db0ede4303..d7981a67c8f 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
@@ -1367,13 +1367,6 @@ components:
- type: string
- type: 'null'
title: Description
- deadline:
- anyOf:
- - items:
- $ref: '#/components/schemas/DeadlineAlertResponse'
- type: array
- - type: 'null'
- title: Deadline
timetable_summary:
anyOf:
- type: string
@@ -1464,7 +1457,6 @@ components:
- relative_fileloc
- fileloc
- description
- - deadline
- timetable_summary
- timetable_description
- tags
@@ -1604,31 +1596,6 @@ components:
- queued_dag_count
title: DashboardDagStatsResponse
description: Dashboard DAG Stats serializer for responses.
- DeadlineAlertResponse:
- properties:
- reference:
- type: string
- title: Reference
- interval:
- type: string
- format: duration
- title: Interval
- callback:
- type: string
- title: Callback
- callback_kwargs:
- anyOf:
- - additionalProperties: true
- type: object
- - type: 'null'
- title: Callback Kwargs
- type: object
- required:
- - reference
- - interval
- - callback
- title: DeadlineAlertResponse
- description: Deadline alert serializer for responses.
EdgeResponse:
properties:
source_id:
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 9fb1d1052e1..894c306581c 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
@@ -8777,13 +8777,6 @@ components:
- type: string
- type: 'null'
title: Description
- deadline:
- anyOf:
- - items:
- $ref: '#/components/schemas/DeadlineAlertResponse'
- type: array
- - type: 'null'
- title: Deadline
timetable_summary:
anyOf:
- type: string
@@ -8951,7 +8944,6 @@ components:
- relative_fileloc
- fileloc
- description
- - deadline
- timetable_summary
- timetable_description
- tags
@@ -9043,13 +9035,6 @@ components:
- type: string
- type: 'null'
title: Description
- deadline:
- anyOf:
- - items:
- $ref: '#/components/schemas/DeadlineAlertResponse'
- type: array
- - type: 'null'
- title: Deadline
timetable_summary:
anyOf:
- type: string
@@ -9129,7 +9114,6 @@ components:
- relative_fileloc
- fileloc
- description
- - deadline
- timetable_summary
- timetable_description
- tags
@@ -9748,31 +9732,6 @@ components:
This is the set of allowable values for the ``warning_type`` field
in the DagWarning model.'
- DeadlineAlertResponse:
- properties:
- reference:
- type: string
- title: Reference
- interval:
- type: string
- format: duration
- title: Interval
- callback:
- type: string
- title: Callback
- callback_kwargs:
- anyOf:
- - additionalProperties: true
- type: object
- - type: 'null'
- title: Callback Kwargs
- type: object
- required:
- - reference
- - interval
- - callback
- title: DeadlineAlertResponse
- description: Deadline alert serializer for responses.
DryRunBackfillCollectionResponse:
properties:
backfills:
diff --git a/airflow-core/src/airflow/cli/commands/dag_command.py
b/airflow-core/src/airflow/cli/commands/dag_command.py
index 4553b5c57c2..f23c52321f9 100644
--- a/airflow-core/src/airflow/cli/commands/dag_command.py
+++ b/airflow-core/src/airflow/cli/commands/dag_command.py
@@ -259,7 +259,6 @@ def _get_dagbag_dag_details(dag: DAG) -> dict:
"next_dagrun_data_interval_end": None,
"next_dagrun_logical_date": None,
"next_dagrun_run_after": None,
- "deadline": None,
}
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 a26e0d49601..a91264eb077 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
@@ -1643,20 +1643,6 @@ export const $DAGDetailsResponse = {
],
title: 'Description'
},
- deadline: {
- anyOf: [
- {
- items: {
- '$ref': '#/components/schemas/DeadlineAlertResponse'
- },
- type: 'array'
- },
- {
- type: 'null'
- }
- ],
- title: 'Deadline'
- },
timetable_summary: {
anyOf: [
{
@@ -1947,7 +1933,7 @@ export const $DAGDetailsResponse = {
}
},
type: 'object',
- required: ['dag_id', 'dag_display_name', 'is_paused', 'is_stale',
'last_parsed_time', 'last_expired', 'bundle_name', 'bundle_version',
'relative_fileloc', 'fileloc', 'description', 'deadline', 'timetable_summary',
'timetable_description', 'tags', 'max_active_tasks', 'max_active_runs',
'max_consecutive_failed_dag_runs', 'has_task_concurrency_limits',
'has_import_errors', 'next_dagrun_logical_date',
'next_dagrun_data_interval_start', 'next_dagrun_data_interval_end',
'next_dagrun_run_af [...]
+ required: ['dag_id', 'dag_display_name', 'is_paused', 'is_stale',
'last_parsed_time', 'last_expired', 'bundle_name', 'bundle_version',
'relative_fileloc', 'fileloc', 'description', 'timetable_summary',
'timetable_description', 'tags', 'max_active_tasks', 'max_active_runs',
'max_consecutive_failed_dag_runs', 'has_task_concurrency_limits',
'has_import_errors', 'next_dagrun_logical_date',
'next_dagrun_data_interval_start', 'next_dagrun_data_interval_end',
'next_dagrun_run_after', 'owner [...]
title: 'DAGDetailsResponse',
description: 'Specific serializer for DAG Details responses.'
} as const;
@@ -2056,20 +2042,6 @@ export const $DAGResponse = {
],
title: 'Description'
},
- deadline: {
- anyOf: [
- {
- items: {
- '$ref': '#/components/schemas/DeadlineAlertResponse'
- },
- type: 'array'
- },
- {
- type: 'null'
- }
- ],
- title: 'Deadline'
- },
timetable_summary: {
anyOf: [
{
@@ -2189,7 +2161,7 @@ export const $DAGResponse = {
}
},
type: 'object',
- required: ['dag_id', 'dag_display_name', 'is_paused', 'is_stale',
'last_parsed_time', 'last_expired', 'bundle_name', 'bundle_version',
'relative_fileloc', 'fileloc', 'description', 'deadline', 'timetable_summary',
'timetable_description', 'tags', 'max_active_tasks', 'max_active_runs',
'max_consecutive_failed_dag_runs', 'has_task_concurrency_limits',
'has_import_errors', 'next_dagrun_logical_date',
'next_dagrun_data_interval_start', 'next_dagrun_data_interval_end',
'next_dagrun_run_af [...]
+ required: ['dag_id', 'dag_display_name', 'is_paused', 'is_stale',
'last_parsed_time', 'last_expired', 'bundle_name', 'bundle_version',
'relative_fileloc', 'fileloc', 'description', 'timetable_summary',
'timetable_description', 'tags', 'max_active_tasks', 'max_active_runs',
'max_consecutive_failed_dag_runs', 'has_task_concurrency_limits',
'has_import_errors', 'next_dagrun_logical_date',
'next_dagrun_data_interval_start', 'next_dagrun_data_interval_end',
'next_dagrun_run_after', 'owner [...]
title: 'DAGResponse',
description: 'DAG serializer for responses.'
} as const;
@@ -3050,40 +3022,6 @@ This is the set of allowable values for the
\`\`warning_type\`\` field
in the DagWarning model.`
} as const;
-export const $DeadlineAlertResponse = {
- properties: {
- reference: {
- type: 'string',
- title: 'Reference'
- },
- interval: {
- type: 'string',
- format: 'duration',
- title: 'Interval'
- },
- callback: {
- type: 'string',
- title: 'Callback'
- },
- callback_kwargs: {
- anyOf: [
- {
- additionalProperties: true,
- type: 'object'
- },
- {
- type: 'null'
- }
- ],
- title: 'Callback Kwargs'
- }
- },
- type: 'object',
- required: ['reference', 'interval', 'callback'],
- title: 'DeadlineAlertResponse',
- description: 'Deadline alert serializer for responses.'
-} as const;
-
export const $DryRunBackfillCollectionResponse = {
properties: {
backfills: {
@@ -6668,20 +6606,6 @@ export const $DAGWithLatestDagRunsResponse = {
],
title: 'Description'
},
- deadline: {
- anyOf: [
- {
- items: {
- '$ref': '#/components/schemas/DeadlineAlertResponse'
- },
- type: 'array'
- },
- {
- type: 'null'
- }
- ],
- title: 'Deadline'
- },
timetable_summary: {
anyOf: [
{
@@ -6820,7 +6744,7 @@ export const $DAGWithLatestDagRunsResponse = {
}
},
type: 'object',
- required: ['dag_id', 'dag_display_name', 'is_paused', 'is_stale',
'last_parsed_time', 'last_expired', 'bundle_name', 'bundle_version',
'relative_fileloc', 'fileloc', 'description', 'deadline', 'timetable_summary',
'timetable_description', 'tags', 'max_active_tasks', 'max_active_runs',
'max_consecutive_failed_dag_runs', 'has_task_concurrency_limits',
'has_import_errors', 'next_dagrun_logical_date',
'next_dagrun_data_interval_start', 'next_dagrun_data_interval_end',
'next_dagrun_run_af [...]
+ required: ['dag_id', 'dag_display_name', 'is_paused', 'is_stale',
'last_parsed_time', 'last_expired', 'bundle_name', 'bundle_version',
'relative_fileloc', 'fileloc', 'description', 'timetable_summary',
'timetable_description', 'tags', 'max_active_tasks', 'max_active_runs',
'max_consecutive_failed_dag_runs', 'has_task_concurrency_limits',
'has_import_errors', 'next_dagrun_logical_date',
'next_dagrun_data_interval_start', 'next_dagrun_data_interval_end',
'next_dagrun_run_after', 'owner [...]
title: 'DAGWithLatestDagRunsResponse',
description: 'DAG with latest dag runs response serializer.'
} as const;
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 17e7de16780..bed40429143 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
@@ -496,7 +496,6 @@ export type DAGDetailsResponse = {
relative_fileloc: string | null;
fileloc: string;
description: string | null;
- deadline: Array<DeadlineAlertResponse> | null;
timetable_summary: string | null;
timetable_description: string | null;
tags: Array<DagTagResponse>;
@@ -568,7 +567,6 @@ export type DAGResponse = {
relative_fileloc: string | null;
fileloc: string;
description: string | null;
- deadline: Array<DeadlineAlertResponse> | null;
timetable_summary: string | null;
timetable_description: string | null;
tags: Array<DagTagResponse>;
@@ -812,18 +810,6 @@ export type DagVersionResponse = {
*/
export type DagWarningType = 'asset conflict' | 'non-existent pool';
-/**
- * Deadline alert serializer for responses.
- */
-export type DeadlineAlertResponse = {
- reference: string;
- interval: string;
- callback: string;
- callback_kwargs?: {
- [key: string]: unknown;
-} | null;
-};
-
/**
* Backfill collection serializer for responses in dry-run mode.
*/
@@ -1732,7 +1718,6 @@ export type DAGWithLatestDagRunsResponse = {
relative_fileloc: string | null;
fileloc: string;
description: string | null;
- deadline: Array<DeadlineAlertResponse> | null;
timetable_summary: string | null;
timetable_description: string | null;
tags: Array<DagTagResponse>;
diff --git a/airflow-core/src/airflow/ui/src/pages/DagsList/DagCard.test.tsx
b/airflow-core/src/airflow/ui/src/pages/DagsList/DagCard.test.tsx
index c5ed905568f..376aeb7b461 100644
--- a/airflow-core/src/airflow/ui/src/pages/DagsList/DagCard.test.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/DagsList/DagCard.test.tsx
@@ -34,7 +34,6 @@ const mockDag = {
bundle_version: "1",
dag_display_name: "nested_groups",
dag_id: "nested_groups",
- deadline: null,
description: null,
file_token:
"Ii9maWxlcy9kYWdzL25lc3RlZF90YXNrX2dyb3Vwcy5weSI.G3EkdxmDUDQsVb7AIZww1TSGlFE",
fileloc: "/files/dags/nested_task_groups.py",
diff --git
a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py
b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py
index ed0e9c147ea..84dbf60c225 100644
--- a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py
+++ b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py
@@ -549,7 +549,6 @@ class TestDagDetails(TestDagEndpoint):
},
"description": None,
"doc_md": "details",
- "deadline": None,
"end_date": None,
"fileloc": __file__,
"file_token": file_token,
@@ -638,7 +637,6 @@ class TestGetDag(TestDagEndpoint):
"is_stale": False,
"owners": ["airflow"],
"timetable_summary": None,
- "deadline": None,
"tags": [],
"has_task_concurrency_limits": True,
"next_dagrun_data_interval_start": None,
diff --git a/airflow-ctl/src/airflowctl/api/datamodels/generated.py
b/airflow-ctl/src/airflowctl/api/datamodels/generated.py
index 1fecf1b6b3a..0fe1d48ae40 100644
--- a/airflow-ctl/src/airflowctl/api/datamodels/generated.py
+++ b/airflow-ctl/src/airflowctl/api/datamodels/generated.py
@@ -468,17 +468,6 @@ class DagWarningType(str, Enum):
NON_EXISTENT_POOL = "non-existent pool"
-class DeadlineAlertResponse(BaseModel):
- """
- Deadline alert serializer for responses.
- """
-
- reference: Annotated[str, Field(title="Reference")]
- interval: Annotated[timedelta, Field(title="Interval")]
- callback: Annotated[str, Field(title="Callback")]
- callback_kwargs: Annotated[dict[str, Any] | None, Field(title="Callback
Kwargs")] = None
-
-
class DryRunBackfillResponse(BaseModel):
"""
Backfill serializer for responses in dry-run mode.
@@ -1258,7 +1247,6 @@ class DAGDetailsResponse(BaseModel):
relative_fileloc: Annotated[str | None, Field(title="Relative Fileloc")] =
None
fileloc: Annotated[str, Field(title="Fileloc")]
description: Annotated[str | None, Field(title="Description")] = None
- deadline: Annotated[list[DeadlineAlertResponse] | None,
Field(title="Deadline")] = None
timetable_summary: Annotated[str | None, Field(title="Timetable Summary")]
= None
timetable_description: Annotated[str | None, Field(title="Timetable
Description")] = None
tags: Annotated[list[DagTagResponse], Field(title="Tags")]
@@ -1315,7 +1303,6 @@ class DAGResponse(BaseModel):
relative_fileloc: Annotated[str | None, Field(title="Relative Fileloc")] =
None
fileloc: Annotated[str, Field(title="Fileloc")]
description: Annotated[str | None, Field(title="Description")] = None
- deadline: Annotated[list[DeadlineAlertResponse] | None,
Field(title="Deadline")] = None
timetable_summary: Annotated[str | None, Field(title="Timetable Summary")]
= None
timetable_description: Annotated[str | None, Field(title="Timetable
Description")] = None
tags: Annotated[list[DagTagResponse], Field(title="Tags")]