Skip to content

Commit

Permalink
fix some tests [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ashb committed Oct 29, 2024
1 parent 11e4304 commit c0d765b
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 54 deletions.
1 change: 0 additions & 1 deletion airflow/api_connexion/schemas/dag_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class Meta:
last_parsed_time = auto_field(dump_only=True)
last_pickled = auto_field(dump_only=True)
last_expired = auto_field(dump_only=True)
pickle_id = auto_field(dump_only=True)
default_view = auto_field(dump_only=True)
fileloc = auto_field(dump_only=True)
file_token = fields.Method("get_token", dump_only=True)
Expand Down
4 changes: 0 additions & 4 deletions airflow/api_fastapi/core_api/openapi/v1-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1797,9 +1797,6 @@ components:
- type: boolean
- type: 'null'
title: Is Paused Upon Creation
orientation:
type: string
title: Orientation
params:
anyOf:
- type: object
Expand Down Expand Up @@ -1869,7 +1866,6 @@ components:
- start_date
- end_date
- is_paused_upon_creation
- orientation
- params
- render_template_as_native_obj
- template_search_path
Expand Down
1 change: 0 additions & 1 deletion airflow/api_fastapi/core_api/serializers/dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ class DAGDetailsResponse(DAGResponse):
start_date: datetime | None
end_date: datetime | None
is_paused_upon_creation: bool | None
orientation: str
params: abc.MutableMapping | None
render_template_as_native_obj: bool
template_search_path: Iterable[str] | None
Expand Down
1 change: 0 additions & 1 deletion airflow/cli/commands/dag_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ def _get_dagbag_dag_details(dag: DAG) -> dict:
"last_parsed_time": None,
"last_pickled": None,
"last_expired": None,
"pickle_id": dag.pickle_id,
"default_view": dag.default_view,
"fileloc": dag.fileloc,
"file_token": None,
Expand Down
2 changes: 1 addition & 1 deletion airflow/models/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def _convert_max_consecutive_failed_dag_runs(val: int) -> int:


@functools.total_ordering
@attrs.define(hash=False, repr=False, eq=False)
@attrs.define(hash=False, repr=False, eq=False, slots=False)
class DAG(TaskSDKDag, LoggingMixin):
"""
A dag (directed acyclic graph) is a collection of tasks with directional dependencies.
Expand Down
5 changes: 0 additions & 5 deletions airflow/ui/openapi-gen/requests/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,6 @@ export const $DAGDetailsResponse = {
],
title: "Is Paused Upon Creation",
},
orientation: {
type: "string",
title: "Orientation",
},
params: {
anyOf: [
{
Expand Down Expand Up @@ -619,7 +615,6 @@ export const $DAGDetailsResponse = {
"start_date",
"end_date",
"is_paused_upon_creation",
"orientation",
"params",
"render_template_as_native_obj",
"template_search_path",
Expand Down
1 change: 0 additions & 1 deletion airflow/ui/openapi-gen/requests/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ export type DAGDetailsResponse = {
start_date: string | null;
end_date: string | null;
is_paused_upon_creation: boolean | null;
orientation: string;
params: {
[key: string]: unknown;
} | null;
Expand Down
32 changes: 0 additions & 32 deletions tests/api_connexion/endpoints/test_dag_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ def test_should_respond_200(self):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
} == response.json

@conf_vars({("webserver", "secret_key"): "mysecret"})
Expand Down Expand Up @@ -230,7 +229,6 @@ def test_should_respond_200_with_schedule_none(self, session):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
} == response.json

def test_should_respond_404(self):
Expand Down Expand Up @@ -331,7 +329,6 @@ def test_should_respond_200(self, url_safe_serializer):
"value": 1,
}
},
"pickle_id": None,
"render_template_as_native_obj": False,
"timetable_summary": "2 2 * * *",
"start_date": "2020-06-15T00:00:00+00:00",
Expand Down Expand Up @@ -393,7 +390,6 @@ def test_should_respond_200_with_asset_expression(self, url_safe_serializer):
"value": 1,
}
},
"pickle_id": None,
"render_template_as_native_obj": False,
"timetable_summary": "2 2 * * *",
"start_date": "2020-06-15T00:00:00+00:00",
Expand Down Expand Up @@ -443,7 +439,6 @@ def test_should_response_200_with_doc_md_none(self, url_safe_serializer):
"orientation": "LR",
"owners": [],
"params": {},
"pickle_id": None,
"render_template_as_native_obj": False,
"timetable_summary": "2 2 * * *",
"start_date": "2020-06-15T00:00:00+00:00",
Expand Down Expand Up @@ -493,7 +488,6 @@ def test_should_response_200_for_null_start_date(self, url_safe_serializer):
"orientation": "LR",
"owners": [],
"params": {},
"pickle_id": None,
"render_template_as_native_obj": False,
"timetable_summary": "2 2 * * *",
"start_date": None,
Expand Down Expand Up @@ -552,7 +546,6 @@ def test_should_respond_200_serialized(self, url_safe_serializer):
"value": 1,
}
},
"pickle_id": None,
"render_template_as_native_obj": False,
"timetable_summary": "2 2 * * *",
"start_date": "2020-06-15T00:00:00+00:00",
Expand Down Expand Up @@ -612,7 +605,6 @@ def test_should_respond_200_serialized(self, url_safe_serializer):
"value": 1,
}
},
"pickle_id": None,
"render_template_as_native_obj": False,
"timetable_summary": "2 2 * * *",
"start_date": "2020-06-15T00:00:00+00:00",
Expand Down Expand Up @@ -712,7 +704,6 @@ def test_should_respond_200(self, session, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
{
"dag_id": "TEST_DAG_2",
Expand All @@ -739,7 +730,6 @@ def test_should_respond_200(self, session, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
],
"total_entries": 2,
Expand Down Expand Up @@ -778,7 +768,6 @@ def test_only_active_true_returns_active_dags(self, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
}
],
"total_entries": 1,
Expand Down Expand Up @@ -818,7 +807,6 @@ def test_only_active_false_returns_all_dags(self, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
{
"dag_id": "TEST_DAG_DELETED_1",
Expand All @@ -845,7 +833,6 @@ def test_only_active_false_returns_all_dags(self, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
],
"total_entries": 2,
Expand Down Expand Up @@ -1001,7 +988,6 @@ def test_paused_true_returns_paused_dags(self, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
}
],
"total_entries": 1,
Expand Down Expand Up @@ -1040,7 +1026,6 @@ def test_paused_false_returns_unpaused_dags(self, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
}
],
"total_entries": 1,
Expand Down Expand Up @@ -1079,7 +1064,6 @@ def test_paused_none_returns_all_dags(self, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
{
"dag_id": "TEST_DAG_UNPAUSED_1",
Expand All @@ -1106,7 +1090,6 @@ def test_paused_none_returns_all_dags(self, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
],
"total_entries": 2,
Expand Down Expand Up @@ -1195,7 +1178,6 @@ def test_should_respond_200_on_patch_is_paused(self, url_safe_serializer, sessio
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
}
assert response.json == expected_response
_check_last_log(
Expand Down Expand Up @@ -1293,7 +1275,6 @@ def test_should_respond_200_with_update_mask(self, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
}
assert response.json == expected_response

Expand Down Expand Up @@ -1387,7 +1368,6 @@ def test_should_respond_200_on_patch_is_paused(self, session, url_safe_serialize
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
{
"dag_id": "TEST_DAG_2",
Expand All @@ -1414,7 +1394,6 @@ def test_should_respond_200_on_patch_is_paused(self, session, url_safe_serialize
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
],
"total_entries": 2,
Expand Down Expand Up @@ -1466,7 +1445,6 @@ def test_should_respond_200_on_patch_is_paused_using_update_mask(self, session,
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
{
"dag_id": "TEST_DAG_2",
Expand All @@ -1493,7 +1471,6 @@ def test_should_respond_200_on_patch_is_paused_using_update_mask(self, session,
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
],
"total_entries": 2,
Expand Down Expand Up @@ -1585,7 +1562,6 @@ def test_only_active_true_returns_active_dags(self, url_safe_serializer, session
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
}
],
"total_entries": 1,
Expand Down Expand Up @@ -1633,7 +1609,6 @@ def test_only_active_false_returns_all_dags(self, url_safe_serializer, session):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
{
"dag_id": "TEST_DAG_DELETED_1",
Expand All @@ -1660,7 +1635,6 @@ def test_only_active_false_returns_all_dags(self, url_safe_serializer, session):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
],
"total_entries": 2,
Expand Down Expand Up @@ -1858,7 +1832,6 @@ def test_should_respond_200_and_pause_dags(self, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
{
"dag_id": "TEST_DAG_2",
Expand All @@ -1885,7 +1858,6 @@ def test_should_respond_200_and_pause_dags(self, url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
],
"total_entries": 2,
Expand Down Expand Up @@ -1933,7 +1905,6 @@ def test_should_respond_200_and_pause_dag_pattern(self, session, url_safe_serial
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
{
"dag_id": "TEST_DAG_10",
Expand All @@ -1960,7 +1931,6 @@ def test_should_respond_200_and_pause_dag_pattern(self, session, url_safe_serial
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
],
"total_entries": 2,
Expand Down Expand Up @@ -2010,7 +1980,6 @@ def test_should_respond_200_and_reverse_ordering(self, session, url_safe_seriali
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
{
"dag_id": "TEST_DAG_1",
Expand All @@ -2037,7 +2006,6 @@ def test_should_respond_200_and_reverse_ordering(self, session, url_safe_seriali
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": False,
"pickle_id": None,
},
],
"total_entries": 2,
Expand Down
5 changes: 0 additions & 5 deletions tests/api_connexion/schemas/test_dag_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def test_serialize_test_dag_schema(url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": None,
"pickle_id": None,
} == serialized_dag


Expand Down Expand Up @@ -108,7 +107,6 @@ def test_serialize_test_dag_collection_schema(url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": None,
"pickle_id": None,
},
{
"dag_id": "test_dag_id_b",
Expand All @@ -135,7 +133,6 @@ def test_serialize_test_dag_collection_schema(url_safe_serializer):
"last_parsed_time": None,
"timetable_description": None,
"has_import_errors": None,
"pickle_id": None,
},
],
"total_entries": 2,
Expand Down Expand Up @@ -190,7 +187,6 @@ def test_serialize_test_dag_detail_schema(url_safe_serializer):
"timezone": UTC_JSON_REPR,
"max_active_runs": 16,
"max_consecutive_failed_dag_runs": 0,
"pickle_id": None,
"end_date": None,
"is_paused_upon_creation": None,
"render_template_as_native_obj": False,
Expand Down Expand Up @@ -254,7 +250,6 @@ def test_serialize_test_dag_with_asset_schedule_detail_schema(url_safe_serialize
"timezone": UTC_JSON_REPR,
"max_active_runs": 16,
"max_consecutive_failed_dag_runs": 0,
"pickle_id": None,
"end_date": None,
"is_paused_upon_creation": None,
"render_template_as_native_obj": False,
Expand Down
1 change: 0 additions & 1 deletion tests/api_fastapi/core_api/routes/public/test_dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ def test_dag_details(
"next_dagrun_create_after": None,
"next_dagrun_data_interval_end": None,
"next_dagrun_data_interval_start": None,
"orientation": "LR",
"owners": ["airflow"],
"params": {
"foo": {
Expand Down
Loading

0 comments on commit c0d765b

Please sign in to comment.