uranusjr commented on code in PR #33988:
URL: https://github.com/apache/airflow/pull/33988#discussion_r1312718609
##########
airflow/ti_deps/deps/trigger_rule_dep.py:
##########
@@ -367,20 +367,7 @@ def _iter_upstream_conditions() ->
Iterator[ColumnOperators]:
f"upstream_task_ids={task.upstream_task_ids}"
)
)
- elif trigger_rule == TR.NONE_FAILED:
- num_failures = upstream - success - skipped
- if ti.map_index > -1:
- num_failures -= removed
- if num_failures > 0:
- yield self._failing_status(
- reason=(
- f"Task's trigger rule '{trigger_rule}' requires all
upstream tasks to have "
- f"succeeded or been skipped, but found {num_failures}
non-success(es). "
- f"upstream_states={upstream_states}, "
- f"upstream_task_ids={task.upstream_task_ids}"
- )
- )
- elif trigger_rule == TR.NONE_FAILED_MIN_ONE_SUCCESS:
+ elif trigger_rule in (TR.NONE_FAILED, TR.NONE_FAILED_MIN_ONE_SUCCESS):
Review Comment:
Not sure I like using `in` here; an `or` combination of `==` would be better.
--
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]