This is an automated email from the ASF dual-hosted git repository.
potiuk 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 b9b3b41f29 Removed deprecated concurrency field from dag details
schema (#42660)
b9b3b41f29 is described below
commit b9b3b41f29e998108639f04a511024decc3ba8a8
Author: Gopal Dirisala <[email protected]>
AuthorDate: Thu Oct 3 06:40:49 2024 +0530
Removed deprecated concurrency field from dag details schema (#42660)
* Removed deprecated concurrency field from dag details schema
* Added news fragment
---
airflow/api_connexion/schemas/dag_schema.py | 5 -----
newsfragments/42660.significant.rst | 1 +
tests/api_connexion/endpoints/test_dag_endpoint.py | 6 ------
tests/api_connexion/schemas/test_dag_schema.py | 2 --
4 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/airflow/api_connexion/schemas/dag_schema.py
b/airflow/api_connexion/schemas/dag_schema.py
index 61046a0f4a..6c7ff6fdc3 100644
--- a/airflow/api_connexion/schemas/dag_schema.py
+++ b/airflow/api_connexion/schemas/dag_schema.py
@@ -97,7 +97,6 @@ class DAGDetailSchema(DAGSchema):
timezone = TimezoneField(dump_only=True)
catchup = fields.Boolean(dump_only=True)
orientation = fields.String(dump_only=True)
- concurrency = fields.Method("get_concurrency", dump_only=True) # TODO:
Remove in Airflow 3.0
max_active_tasks = fields.Integer(dump_only=True)
dataset_expression = fields.Dict(allow_none=True)
start_date = fields.DateTime(dump_only=True)
@@ -114,10 +113,6 @@ class DAGDetailSchema(DAGSchema):
render_template_as_native_obj = fields.Boolean(dump_only=True)
last_loaded = fields.DateTime(dump_only=True, data_key="last_parsed")
- @staticmethod
- def get_concurrency(obj: DAG):
- return obj.max_active_tasks
-
@staticmethod
def get_tags(obj: DAG):
"""Dump tags as objects."""
diff --git a/newsfragments/42660.significant.rst
b/newsfragments/42660.significant.rst
new file mode 100644
index 0000000000..cdedf64687
--- /dev/null
+++ b/newsfragments/42660.significant.rst
@@ -0,0 +1 @@
+Deprecated field ``concurrency`` from ``DAGDetailSchema`` has been removed.
Please use ``max_active_tasks`` from ``DAGDetailSchema`` instead.
diff --git a/tests/api_connexion/endpoints/test_dag_endpoint.py
b/tests/api_connexion/endpoints/test_dag_endpoint.py
index 6d4ffc2d06..907009d26d 100644
--- a/tests/api_connexion/endpoints/test_dag_endpoint.py
+++ b/tests/api_connexion/endpoints/test_dag_endpoint.py
@@ -296,7 +296,6 @@ class TestGetDagDetails(TestDagEndpoint):
last_parsed = response.json["last_parsed"]
expected = {
"catchup": True,
- "concurrency": 16,
"dag_id": "test_dag",
"dag_display_name": "test_dag",
"dag_run_timeout": None,
@@ -355,7 +354,6 @@ class TestGetDagDetails(TestDagEndpoint):
last_parsed = response.json["last_parsed"]
expected = {
"catchup": True,
- "concurrency": 16,
"dag_id": "test_dag",
"dag_display_name": "test_dag",
"dag_run_timeout": None,
@@ -419,7 +417,6 @@ class TestGetDagDetails(TestDagEndpoint):
last_parsed = response.json["last_parsed"]
expected = {
"catchup": True,
- "concurrency": 16,
"dag_id": "test_dag2",
"dag_display_name": "test_dag2",
"dag_run_timeout": None,
@@ -471,7 +468,6 @@ class TestGetDagDetails(TestDagEndpoint):
last_parsed = response.json["last_parsed"]
expected = {
"catchup": True,
- "concurrency": 16,
"dag_id": "test_dag3",
"dag_display_name": "test_dag3",
"dag_run_timeout": None,
@@ -526,7 +522,6 @@ class TestGetDagDetails(TestDagEndpoint):
expected = {
"catchup": True,
- "concurrency": 16,
"dag_id": "test_dag",
"dag_display_name": "test_dag",
"dag_run_timeout": None,
@@ -588,7 +583,6 @@ class TestGetDagDetails(TestDagEndpoint):
assert response.status_code == 200
expected = {
"catchup": True,
- "concurrency": 16,
"dag_id": "test_dag",
"dag_display_name": "test_dag",
"dag_run_timeout": None,
diff --git a/tests/api_connexion/schemas/test_dag_schema.py
b/tests/api_connexion/schemas/test_dag_schema.py
index 1a7e345421..1b83b79842 100644
--- a/tests/api_connexion/schemas/test_dag_schema.py
+++ b/tests/api_connexion/schemas/test_dag_schema.py
@@ -162,7 +162,6 @@ def
test_serialize_test_dag_detail_schema(url_safe_serializer):
expected = {
"catchup": True,
- "concurrency": 16,
"max_active_tasks": 16,
"dag_id": "test_dag",
"dag_display_name": "test_dag",
@@ -227,7 +226,6 @@ def
test_serialize_test_dag_with_asset_schedule_detail_schema(url_safe_serialize
expected = {
"catchup": True,
- "concurrency": 16,
"max_active_tasks": 16,
"dag_id": "test_dag",
"dag_display_name": "test_dag",