[ 
https://issues.apache.org/jira/browse/AIRFLOW-4453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17010232#comment-17010232
 ] 

Joel Croteau commented on AIRFLOW-4453:
---------------------------------------

The problem seems to be [this 
code|https://github.com/kaxil/airflow/blob/master/airflow/ti_deps/deps/trigger_rule_dep.py#L157]:

 
{code:python}
            elif tr == TR.NONE_FAILED:
                if upstream_failed or failed:
                    ti.set_state(State.UPSTREAM_FAILED, session)
                elif skipped == upstream:
                    ti.set_state(State.SKIPPED, session)
{code}

This causes a task to skip if all upstream dependencies are skipped, which 
directly contradicts [the 
documentation|https://airflow.apache.org/docs/stable/concepts.html#trigger-rules],
 which says "`none_failed`: all parents have not failed (`failed` or 
`upstream_failed`) i.e. all parents have succeeded or been skipped." There 
shouldn't be any reason that `none_failed` should ever have to look at skipped 
upstream tasks, so we should really just get rid of the second check altogether.

> none_failed trigger rule cascading skipped state to downstream tasks
> --------------------------------------------------------------------
>
>                 Key: AIRFLOW-4453
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4453
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: DAG
>    Affects Versions: 1.10.3
>            Reporter: Dmytro Kulyk
>            Assignee: Kaxil Naik
>            Priority: Major
>              Labels: skipped
>             Fix For: 1.10.5
>
>         Attachments: cube_update.py, image-2019-05-02-18-11-28-307.png, 
> simple_skip.png
>
>
> Task with trigger_rule = 'none_failed' cascading *skipped *status to 
> downstream task
>  * task have multiple upstream tasks
>  * trigger_rule set to 'none_failed'
>  * some of upstream tasks can be skipped due to *latest only*
> Basing on documentation this shouldn't happen
>  !image-2019-05-02-18-11-28-307.png|width=655,height=372! 
>  DAG attached



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to