You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by Ashok Kumar rathore <as...@gmail.com> on 2020/11/04 17:14:34 UTC

Re: [DISCUSS] Task trigger rules: exit code based

Any comments on the proposal?
We are using Airflow and facing a lot of limitations due to trigger rules.
One more example is, when we have ONE_FAILED | ALL FAILED trigger rule. It
seems only cases this is helpful is when there is a catch all task like
cleanup. Because it considers all previous tasks(not just immediate parent)
to evaluate FAILURE, this task still runs when *any* upstream task fails.

On Mon, Oct 5, 2020 at 9:04 AM Ashok Kumar rathore <
ashokkumarrathore@gmail.com> wrote:

> Hi All,
> I created this small doc for AIP. Wanted to discuss the feasibility as
> well as my understanding of the problem/solution.
>
> *TLDR; Feasibility to use task exit code as branching condition for
> downstream task scheduling*
>
> Thank you in advance.
>
>
> https://docs.google.com/document/d/1OGwnF9igWS5b6biGDluqYuZg7si4LqkGz15IoauI23c/edit#
>
> -Ashok
>

Re: [DISCUSS] Task trigger rules: exit code based

Posted by Kamil BreguĊ‚a <ka...@polidea.com>.
Can't XCOM be used for this? It seems to me that you don't need to make
changes to the trigger rules to be able to handle this, but it can be
handled by well-written branch operators.

I don't understand the use case and your document doesn't describe how you
want to keep backward compatibility.

How should other operators (e.g. BigQueryInsertJobO signal other codes? Do
we have any number of codes or maybe just a subset? Do you see any
alternative solutions to this? What do you mean by the words "exit code"?

On Wed, Nov 4, 2020 at 6:34 PM Ashok Kumar rathore <
ashokkumarrathore@gmail.com> wrote:

> Any comments on the proposal?
> We are using Airflow and facing a lot of limitations due to trigger rules.
> One more example is, when we have ONE_FAILED | ALL FAILED trigger rule. It
> seems only cases this is helpful is when there is a catch all task like
> cleanup. Because it considers all previous tasks(not just immediate parent)
> to evaluate FAILURE, this task still runs when *any* upstream task fails.
>
> On Mon, Oct 5, 2020 at 9:04 AM Ashok Kumar rathore <
> ashokkumarrathore@gmail.com> wrote:
>
>> Hi All,
>> I created this small doc for AIP. Wanted to discuss the feasibility as
>> well as my understanding of the problem/solution.
>>
>> *TLDR; Feasibility to use task exit code as branching condition for
>> downstream task scheduling*
>>
>> Thank you in advance.
>>
>>
>> https://docs.google.com/document/d/1OGwnF9igWS5b6biGDluqYuZg7si4LqkGz15IoauI23c/edit#
>>
>> -Ashok
>>
>