uranusjr commented on code in PR #29909:
URL: https://github.com/apache/airflow/pull/29909#discussion_r1136557865


##########
airflow/models/dag.py:
##########
@@ -546,6 +553,9 @@ def __init__(
         self.last_loaded = timezone.utcnow()
         self.safe_dag_id = dag_id.replace(".", "__dot__")
         self.max_active_runs = max_active_runs
+        if self.timetable.limit_active_runs is not None:
+            if self.timetable.limit_active_runs < self.max_active_runs:
+                self.max_active_runs = self.timetable.limit_active_runs

Review Comment:
   Personally I feel it would be reasonable to fail the DAG since both the 
timetable and `max_active_runs` are DAG-level arguments and they can be 
resolved quite easily by the user. Emitting a DagWarning is reasonable too if 
an error is too aggressive.



-- 
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]

Reply via email to