Skip to content

Commit 623185f

Browse files
authored
Revert "AIP-86: Add deadline to DagResponse (#51698)" (#53616)
This reverts commit 7c31bb5
1 parent 9772b30 commit 623185f

File tree

10 files changed

+3
-217
lines changed

10 files changed

+3
-217
lines changed

airflow-core/src/airflow/api_fastapi/core_api/datamodels/dags.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
from airflow.api_fastapi.core_api.base import BaseModel, StrictBaseModel
3636
from airflow.api_fastapi.core_api.datamodels.dag_tags import DagTagResponse
3737
from airflow.api_fastapi.core_api.datamodels.dag_versions import DagVersionResponse
38-
from airflow.api_fastapi.core_api.datamodels.deadline import DeadlineAlertResponse
3938
from airflow.configuration import conf
4039
from airflow.models.dag_version import DagVersion
4140

@@ -68,7 +67,6 @@ class DAGResponse(BaseModel):
6867
relative_fileloc: str | None
6968
fileloc: str
7069
description: str | None
71-
deadline: list[DeadlineAlertResponse] | None
7270
timetable_summary: str | None
7371
timetable_description: str | None
7472
tags: list[DagTagResponse]

airflow-core/src/airflow/api_fastapi/core_api/datamodels/deadline.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

airflow-core/src/airflow/api_fastapi/core_api/openapi/_private_ui.yaml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,13 +1367,6 @@ components:
13671367
- type: string
13681368
- type: 'null'
13691369
title: Description
1370-
deadline:
1371-
anyOf:
1372-
- items:
1373-
$ref: '#/components/schemas/DeadlineAlertResponse'
1374-
type: array
1375-
- type: 'null'
1376-
title: Deadline
13771370
timetable_summary:
13781371
anyOf:
13791372
- type: string
@@ -1464,7 +1457,6 @@ components:
14641457
- relative_fileloc
14651458
- fileloc
14661459
- description
1467-
- deadline
14681460
- timetable_summary
14691461
- timetable_description
14701462
- tags
@@ -1604,31 +1596,6 @@ components:
16041596
- queued_dag_count
16051597
title: DashboardDagStatsResponse
16061598
description: Dashboard DAG Stats serializer for responses.
1607-
DeadlineAlertResponse:
1608-
properties:
1609-
reference:
1610-
type: string
1611-
title: Reference
1612-
interval:
1613-
type: string
1614-
format: duration
1615-
title: Interval
1616-
callback:
1617-
type: string
1618-
title: Callback
1619-
callback_kwargs:
1620-
anyOf:
1621-
- additionalProperties: true
1622-
type: object
1623-
- type: 'null'
1624-
title: Callback Kwargs
1625-
type: object
1626-
required:
1627-
- reference
1628-
- interval
1629-
- callback
1630-
title: DeadlineAlertResponse
1631-
description: Deadline alert serializer for responses.
16321599
EdgeResponse:
16331600
properties:
16341601
source_id:

airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8777,13 +8777,6 @@ components:
87778777
- type: string
87788778
- type: 'null'
87798779
title: Description
8780-
deadline:
8781-
anyOf:
8782-
- items:
8783-
$ref: '#/components/schemas/DeadlineAlertResponse'
8784-
type: array
8785-
- type: 'null'
8786-
title: Deadline
87878780
timetable_summary:
87888781
anyOf:
87898782
- type: string
@@ -8951,7 +8944,6 @@ components:
89518944
- relative_fileloc
89528945
- fileloc
89538946
- description
8954-
- deadline
89558947
- timetable_summary
89568948
- timetable_description
89578949
- tags
@@ -9043,13 +9035,6 @@ components:
90439035
- type: string
90449036
- type: 'null'
90459037
title: Description
9046-
deadline:
9047-
anyOf:
9048-
- items:
9049-
$ref: '#/components/schemas/DeadlineAlertResponse'
9050-
type: array
9051-
- type: 'null'
9052-
title: Deadline
90539038
timetable_summary:
90549039
anyOf:
90559040
- type: string
@@ -9129,7 +9114,6 @@ components:
91299114
- relative_fileloc
91309115
- fileloc
91319116
- description
9132-
- deadline
91339117
- timetable_summary
91349118
- timetable_description
91359119
- tags
@@ -9748,31 +9732,6 @@ components:
97489732
This is the set of allowable values for the ``warning_type`` field
97499733
97509734
in the DagWarning model.'
9751-
DeadlineAlertResponse:
9752-
properties:
9753-
reference:
9754-
type: string
9755-
title: Reference
9756-
interval:
9757-
type: string
9758-
format: duration
9759-
title: Interval
9760-
callback:
9761-
type: string
9762-
title: Callback
9763-
callback_kwargs:
9764-
anyOf:
9765-
- additionalProperties: true
9766-
type: object
9767-
- type: 'null'
9768-
title: Callback Kwargs
9769-
type: object
9770-
required:
9771-
- reference
9772-
- interval
9773-
- callback
9774-
title: DeadlineAlertResponse
9775-
description: Deadline alert serializer for responses.
97769735
DryRunBackfillCollectionResponse:
97779736
properties:
97789737
backfills:

airflow-core/src/airflow/cli/commands/dag_command.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ def _get_dagbag_dag_details(dag: DAG) -> dict:
259259
"next_dagrun_data_interval_end": None,
260260
"next_dagrun_logical_date": None,
261261
"next_dagrun_run_after": None,
262-
"deadline": None,
263262
}
264263

265264

airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts

Lines changed: 3 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,20 +1643,6 @@ export const $DAGDetailsResponse = {
16431643
],
16441644
title: 'Description'
16451645
},
1646-
deadline: {
1647-
anyOf: [
1648-
{
1649-
items: {
1650-
'$ref': '#/components/schemas/DeadlineAlertResponse'
1651-
},
1652-
type: 'array'
1653-
},
1654-
{
1655-
type: 'null'
1656-
}
1657-
],
1658-
title: 'Deadline'
1659-
},
16601646
timetable_summary: {
16611647
anyOf: [
16621648
{
@@ -1947,7 +1933,7 @@ export const $DAGDetailsResponse = {
19471933
}
19481934
},
19491935
type: 'object',
1950-
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_after', 'owners', 'catchup', 'dag_run_timeout', 'asset_expression', 'doc_md', 'start_date', 'end_date', 'is_paused_upon_creation', 'params', 'render_template_as_native_obj', 'template_search_path', 'timezone', 'last_parsed', 'default_args', 'file_token', 'concurrency', 'latest_dag_version'],
1936+
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', 'owners', 'catchup', 'dag_run_timeout', 'asset_expression', 'doc_md', 'start_date', 'end_date', 'is_paused_upon_creation', 'params', 'render_template_as_native_obj', 'template_search_path', 'timezone', 'last_parsed', 'default_args', 'file_token', 'concurrency', 'latest_dag_version'],
19511937
title: 'DAGDetailsResponse',
19521938
description: 'Specific serializer for DAG Details responses.'
19531939
} as const;
@@ -2056,20 +2042,6 @@ export const $DAGResponse = {
20562042
],
20572043
title: 'Description'
20582044
},
2059-
deadline: {
2060-
anyOf: [
2061-
{
2062-
items: {
2063-
'$ref': '#/components/schemas/DeadlineAlertResponse'
2064-
},
2065-
type: 'array'
2066-
},
2067-
{
2068-
type: 'null'
2069-
}
2070-
],
2071-
title: 'Deadline'
2072-
},
20732045
timetable_summary: {
20742046
anyOf: [
20752047
{
@@ -2189,7 +2161,7 @@ export const $DAGResponse = {
21892161
}
21902162
},
21912163
type: 'object',
2192-
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_after', 'owners', 'file_token'],
2164+
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', 'owners', 'file_token'],
21932165
title: 'DAGResponse',
21942166
description: 'DAG serializer for responses.'
21952167
} as const;
@@ -3050,40 +3022,6 @@ This is the set of allowable values for the \`\`warning_type\`\` field
30503022
in the DagWarning model.`
30513023
} as const;
30523024

3053-
export const $DeadlineAlertResponse = {
3054-
properties: {
3055-
reference: {
3056-
type: 'string',
3057-
title: 'Reference'
3058-
},
3059-
interval: {
3060-
type: 'string',
3061-
format: 'duration',
3062-
title: 'Interval'
3063-
},
3064-
callback: {
3065-
type: 'string',
3066-
title: 'Callback'
3067-
},
3068-
callback_kwargs: {
3069-
anyOf: [
3070-
{
3071-
additionalProperties: true,
3072-
type: 'object'
3073-
},
3074-
{
3075-
type: 'null'
3076-
}
3077-
],
3078-
title: 'Callback Kwargs'
3079-
}
3080-
},
3081-
type: 'object',
3082-
required: ['reference', 'interval', 'callback'],
3083-
title: 'DeadlineAlertResponse',
3084-
description: 'Deadline alert serializer for responses.'
3085-
} as const;
3086-
30873025
export const $DryRunBackfillCollectionResponse = {
30883026
properties: {
30893027
backfills: {
@@ -6668,20 +6606,6 @@ export const $DAGWithLatestDagRunsResponse = {
66686606
],
66696607
title: 'Description'
66706608
},
6671-
deadline: {
6672-
anyOf: [
6673-
{
6674-
items: {
6675-
'$ref': '#/components/schemas/DeadlineAlertResponse'
6676-
},
6677-
type: 'array'
6678-
},
6679-
{
6680-
type: 'null'
6681-
}
6682-
],
6683-
title: 'Deadline'
6684-
},
66856609
timetable_summary: {
66866610
anyOf: [
66876611
{
@@ -6820,7 +6744,7 @@ export const $DAGWithLatestDagRunsResponse = {
68206744
}
68216745
},
68226746
type: 'object',
6823-
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_after', 'owners', 'asset_expression', 'latest_dag_runs', 'file_token'],
6747+
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', 'owners', 'asset_expression', 'latest_dag_runs', 'file_token'],
68246748
title: 'DAGWithLatestDagRunsResponse',
68256749
description: 'DAG with latest dag runs response serializer.'
68266750
} as const;

airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,6 @@ export type DAGDetailsResponse = {
496496
relative_fileloc: string | null;
497497
fileloc: string;
498498
description: string | null;
499-
deadline: Array<DeadlineAlertResponse> | null;
500499
timetable_summary: string | null;
501500
timetable_description: string | null;
502501
tags: Array<DagTagResponse>;
@@ -568,7 +567,6 @@ export type DAGResponse = {
568567
relative_fileloc: string | null;
569568
fileloc: string;
570569
description: string | null;
571-
deadline: Array<DeadlineAlertResponse> | null;
572570
timetable_summary: string | null;
573571
timetable_description: string | null;
574572
tags: Array<DagTagResponse>;
@@ -812,18 +810,6 @@ export type DagVersionResponse = {
812810
*/
813811
export type DagWarningType = 'asset conflict' | 'non-existent pool';
814812

815-
/**
816-
* Deadline alert serializer for responses.
817-
*/
818-
export type DeadlineAlertResponse = {
819-
reference: string;
820-
interval: string;
821-
callback: string;
822-
callback_kwargs?: {
823-
[key: string]: unknown;
824-
} | null;
825-
};
826-
827813
/**
828814
* Backfill collection serializer for responses in dry-run mode.
829815
*/
@@ -1732,7 +1718,6 @@ export type DAGWithLatestDagRunsResponse = {
17321718
relative_fileloc: string | null;
17331719
fileloc: string;
17341720
description: string | null;
1735-
deadline: Array<DeadlineAlertResponse> | null;
17361721
timetable_summary: string | null;
17371722
timetable_description: string | null;
17381723
tags: Array<DagTagResponse>;

airflow-core/src/airflow/ui/src/pages/DagsList/DagCard.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const mockDag = {
3434
bundle_version: "1",
3535
dag_display_name: "nested_groups",
3636
dag_id: "nested_groups",
37-
deadline: null,
3837
description: null,
3938
file_token: "Ii9maWxlcy9kYWdzL25lc3RlZF90YXNrX2dyb3Vwcy5weSI.G3EkdxmDUDQsVb7AIZww1TSGlFE",
4039
fileloc: "/files/dags/nested_task_groups.py",

airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ def test_dag_details(
549549
},
550550
"description": None,
551551
"doc_md": "details",
552-
"deadline": None,
553552
"end_date": None,
554553
"fileloc": __file__,
555554
"file_token": file_token,
@@ -638,7 +637,6 @@ def test_get_dag(self, test_client, query_params, dag_id, expected_status_code,
638637
"is_stale": False,
639638
"owners": ["airflow"],
640639
"timetable_summary": None,
641-
"deadline": None,
642640
"tags": [],
643641
"has_task_concurrency_limits": True,
644642
"next_dagrun_data_interval_start": None,

0 commit comments

Comments
 (0)