Skip to content

Revert "AIP-86: Add deadline to DagResponse (#51698)" #53616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 @@ -35,7 +35,6 @@
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

Expand Down Expand Up @@ -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]
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -1352,13 +1352,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
Expand Down Expand Up @@ -1449,7 +1442,6 @@ components:
- relative_fileloc
- fileloc
- description
- deadline
- timetable_summary
- timetable_description
- tags
Expand Down Expand Up @@ -1589,31 +1581,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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8670,13 +8670,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
Expand Down Expand Up @@ -8844,7 +8837,6 @@ components:
- relative_fileloc
- fileloc
- description
- deadline
- timetable_summary
- timetable_description
- tags
Expand Down Expand Up @@ -8936,13 +8928,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
Expand Down Expand Up @@ -9022,7 +9007,6 @@ components:
- relative_fileloc
- fileloc
- description
- deadline
- timetable_summary
- timetable_description
- tags
Expand Down Expand Up @@ -9641,31 +9625,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:
Expand Down
1 change: 0 additions & 1 deletion airflow-core/src/airflow/cli/commands/dag_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}


Expand Down
82 changes: 3 additions & 79 deletions airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
{
Expand Down Expand Up @@ -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_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'],
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'],
title: 'DAGDetailsResponse',
description: 'Specific serializer for DAG Details responses.'
} as const;
Expand Down Expand Up @@ -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: [
{
Expand Down Expand Up @@ -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_after', 'owners', 'file_token'],
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'],
title: 'DAGResponse',
description: 'DAG serializer for responses.'
} as const;
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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: [
{
Expand Down Expand Up @@ -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_after', 'owners', 'asset_expression', 'latest_dag_runs', 'file_token'],
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'],
title: 'DAGWithLatestDagRunsResponse',
description: 'DAG with latest dag runs response serializer.'
} as const;
Expand Down
15 changes: 0 additions & 15 deletions airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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>;
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,6 @@ def test_dag_details(
},
"description": None,
"doc_md": "details",
"deadline": None,
"end_date": None,
"fileloc": __file__,
"file_token": file_token,
Expand Down Expand Up @@ -638,7 +637,6 @@ def test_get_dag(self, test_client, query_params, dag_id, expected_status_code,
"is_stale": False,
"owners": ["airflow"],
"timetable_summary": None,
"deadline": None,
"tags": [],
"has_task_concurrency_limits": True,
"next_dagrun_data_interval_start": None,
Expand Down
Loading