dstandish commented on code in PR #33570:
URL: https://github.com/apache/airflow/pull/33570#discussion_r1304628815
##########
airflow/ti_deps/deps/trigger_rule_dep.py:
##########
@@ -234,14 +250,19 @@ def _iter_upstream_conditions() ->
Iterator[ColumnOperators]:
.group_by(TaskInstance.task_id)
).all()
upstream = sum(count for _, count in task_id_counts)
- upstream_setup = sum(c for t, c in task_id_counts if
upstream_tasks[t].is_setup)
upstream_done = done >= upstream
+ setup_done = (success_setup + skipped_setup + failed_setup) >=
upstream_setup
+ is_tear_down = task.is_teardown or trigger_rule ==
TR.ALL_DONE_SETUP_SUCCESS
Review Comment:
i don't think you need to check both is_teardown and trigger rule.
it should be sufficient to check the trigger rule.
and with that, it may be unnecessary to create this variable
--
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]