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


##########
airflow/ti_deps/deps/trigger_rule_dep.py:
##########
@@ -94,33 +98,41 @@ def _get_dep_statuses(
         session: Session,
         dep_context: DepContext,
     ) -> Iterator[TIDepStatus]:
+        # get all the setup tasks upstream of this task
+        setup_upstream_tasks = list(ti.task.get_upstreams_only_setups())
         # Checking that all upstream dependencies have succeeded.
         if not ti.task.upstream_task_ids:
             yield self._passing_status(reason="The task instance did not have 
any upstream tasks.")
             return
-        if ti.task.trigger_rule == TR.ALWAYS:
+        if ti.task.trigger_rule == TR.ALWAYS and not setup_upstream_tasks:
+            # even with ALWAYS trigger rule, we still need to check setup tasks
             yield self._passing_status(reason="The task had a always trigger 
rule set.")
             return
-        yield from self._evaluate_trigger_rule(ti=ti, dep_context=dep_context, 
session=session)
+        yield from self._evaluate_trigger_rule(

Review Comment:
   given that there's no need to evaluate whether there are upstream setups for 
the purpose of TR.ALWAYS, i think we no longer need this new param 
`setup_upstream_tasks` in `_evaluate_trigger_rule`



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