uranusjr commented on a change in pull request #20900:
URL: https://github.com/apache/airflow/pull/20900#discussion_r786572217
##########
File path: airflow/api_connexion/schemas/dag_schema.py
##########
@@ -79,7 +79,7 @@ class DAGDetailSchema(DAGSchema):
timezone = TimezoneField()
catchup = fields.Boolean()
orientation = fields.String()
- concurrency = fields.Integer() # TODO: Remove in Airflow 3.0
+ concurrency = fields.Method("get_concurrency") # TODO: Remove in Airflow
3.0
Review comment:
Yeah that’s the point. `concurrency = fields.Integer()` triggers
Marshmallow to access the deprecated `concurrency` property and emits a
deprecation warning, and this change instead accesses `max_active_tasks` to
avoid it. The additional `get_concurrency` method is added because Marshmallow
is too smart to detect that `max_active_tasks` is already declared on the
schema (right below this line) and throws an exception if we also directly
access the same attribute for this field.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]