uranusjr commented on code in PR #33570:
URL: https://github.com/apache/airflow/pull/33570#discussion_r1309928233
##########
airflow/models/dag.py:
##########
@@ -717,6 +718,11 @@ def validate_setup_teardown(self):
:meta private:
"""
for task in self.tasks:
+ if task.is_setup:
+ for down_task in task.downstream_list:
+ if not down_task.is_teardown and down_task.trigger_rule !=
TriggerRule.ALL_SUCCESS:
+ # this is required to ensure consistent clearing
behavior when upstream
+ raise ValueError("Setup tasks must be followed with
trigger rule ALL_SUCCESS.")
Review Comment:
Since we’ve drilled this deep, can this show what the offending task is for
clarity?
##########
airflow/models/dag.py:
##########
@@ -717,6 +718,11 @@ def validate_setup_teardown(self):
:meta private:
"""
for task in self.tasks:
+ if task.is_setup:
+ for down_task in task.downstream_list:
+ if not down_task.is_teardown and down_task.trigger_rule !=
TriggerRule.ALL_SUCCESS:
+ # this is required to ensure consistent clearing
behavior when upstream
+ raise ValueError("Setup tasks must be followed with
trigger rule ALL_SUCCESS.")
Review Comment:
Since we’ve drilled this deep, can this show what the offending task is for
clarity?
--
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]