You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/04/30 14:37:49 UTC

[GitHub] [airflow] r-richmond commented on a change in pull request #15467: Mark tasks as failed when using ONE_SUCCESS and Upstream has no successes

r-richmond commented on a change in pull request #15467:
URL: https://github.com/apache/airflow/pull/15467#discussion_r623927859



##########
File path: airflow/ti_deps/deps/trigger_rule_dep.py
##########
@@ -134,8 +134,12 @@ def _evaluate_trigger_rule(  # pylint: disable=too-many-branches
                 if successes or skipped:
                     ti.set_state(State.SKIPPED, session)
             elif trigger_rule == TR.ONE_SUCCESS:
-                if upstream_done and not successes:
+                if upstream_done and done == skipped:
+                    # if upstream is done and all are skipped mark as skipped
                     ti.set_state(State.SKIPPED, session)
+                elif upstream_done and successes <= 0:

Review comment:
       Unclear to me; I'm just following the pattern I see below so that this is consistent.
   
   https://github.com/apache/airflow/blob/5e79b1ed7551345c8b2ffebbef6c873e98058a14/airflow/ti_deps/deps/trigger_rule_dep.py#L155




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org