Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish committed Aug 31, 2023
1 parent 16e3045 commit 8b8e65d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion airflow/ti_deps/deps/trigger_rule_dep.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,9 @@ def _evaluate_direct_relatives() -> Iterator[TIDepStatus]:
# a teardown cannot have any indirect setups
relevant_setups = {t.task_id: t for t in ti.task.get_upstreams_only_setups()}
if relevant_setups:
tasks_dict = relevant_setups # used by _get_relevant_upstream_map_indexes
# set tasks_dict to contain relevant setups
# _get_relevant_upstream_map_indexes will use this to look up the task_id
tasks_dict = relevant_setups
for status, changed in _evaluate_setup_constraint(relevant_setups=relevant_setups):
yield status
if not status.passed and changed:
Expand All @@ -559,5 +561,7 @@ def _evaluate_direct_relatives() -> Iterator[TIDepStatus]:
task = ti.task
trigger_rule = task.trigger_rule
upstream_tasks = {t.task_id: t for t in task.upstream_list}
# set tasks_dict to contain direct upstream tasks
# _get_relevant_upstream_map_indexes will use this to look up the task_id
tasks_dict = upstream_tasks
yield from _evaluate_direct_relatives()

0 comments on commit 8b8e65d

Please sign in to comment.