From 8b8e65d349a25de3e84e213bd7d060d7d554a4aa Mon Sep 17 00:00:00 2001 From: Daniel Standish <15932138+dstandish@users.noreply.github.com> Date: Thu, 31 Aug 2023 14:38:55 -0700 Subject: [PATCH] comments --- airflow/ti_deps/deps/trigger_rule_dep.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/airflow/ti_deps/deps/trigger_rule_dep.py b/airflow/ti_deps/deps/trigger_rule_dep.py index 9852dc0db0cb..97bd4724df42 100644 --- a/airflow/ti_deps/deps/trigger_rule_dep.py +++ b/airflow/ti_deps/deps/trigger_rule_dep.py @@ -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: @@ -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()