dstandish commented on code in PR #33570:
URL: https://github.com/apache/airflow/pull/33570#discussion_r1306720836


##########
airflow/models/dag.py:
##########
@@ -717,6 +718,16 @@ 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 
not in [
+                        TriggerRule.ALL_SUCCESS,
+                        TriggerRule.ONE_SUCCESS,
+                    ]:
+                        # this is required to ensure consistent clearing 
behavior when upstream
+                        raise ValueError(
+                            "Setup tasks must be followed with trigger rule 
ALL_SUCCESS or ONE_SUCCESS."

Review Comment:
   ```suggestion
                               "Setup tasks must be followed with trigger rule 
ALL_SUCCESS."
   ```



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