You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by Aaron Niskode-Dossett <an...@etsy.com.INVALID> on 2020/07/28 19:10:53 UTC

Skipped sensors and cascading skips

Hi friends, the Airflow documentation
<https://airflow.apache.org/docs/stable/concepts.html?highlight=trigger>
states:

Skipped tasks will cascade through trigger rules all_success and all_failed
but not all_done, one_failed, one_success, none_failed,
none_failed_or_skipped, none_skipped and dummy.


Is that accurate?  My experience is that skips cascade through all of those
and the base_sensor_operator code seems consistent with that
understanding:
https://github.com/apache/airflow/blob/master/airflow/sensors/base_sensor_operator.py#L140-L144

Is the documentation out of date (the code I linked to was part of
AIRFLOW-1786) or am I reading it incorrectly?

Thank you very much!

-- 
Aaron Niskode-Dossett, Data Engineering -- Etsy

Re: Skipped sensors and cascading skips

Posted by Yu Qian <yu...@gmail.com>.
I think Aaron is right that the code does not fully comply with the
documentation. The documented behaviour is more intuitive compared to what
_do_skip_downstream_tasks actually does (skipping everything downstream
regardless of their trigger_rule).

There was also an effort to address this here:
https://github.com/apache/airflow/pull/8867 The PR looks working but it
needs to be reviewed by a committer.

On Wed, Jul 29, 2020 at 3:11 AM Aaron Niskode-Dossett
<an...@etsy.com.invalid> wrote:

> Hi friends, the Airflow documentation
> <https://airflow.apache.org/docs/stable/concepts.html?highlight=trigger>
> states:
>
> Skipped tasks will cascade through trigger rules all_success and all_failed
> but not all_done, one_failed, one_success, none_failed,
> none_failed_or_skipped, none_skipped and dummy.
>
>
> Is that accurate?  My experience is that skips cascade through all of those
> and the base_sensor_operator code seems consistent with that
> understanding:
>
> https://github.com/apache/airflow/blob/master/airflow/sensors/base_sensor_operator.py#L140-L144
>
> Is the documentation out of date (the code I linked to was part of
> AIRFLOW-1786) or am I reading it incorrectly?
>
> Thank you very much!
>
> --
> Aaron Niskode-Dossett, Data Engineering -- Etsy
>