3

I have following dag

task_a >> task_b>> task_c 

task_b has all_done trigger rule

task_c has all_success trigger rule

if task a fails, will task_c will get executed?

Elad Kalif
  • 14,110
  • 2
  • 17
  • 49
Alexander
  • 55
  • 6

1 Answers1

2

Yes, in that scenario task_c will be executed.

Trigger Rules consider the statuses of directly upstream tasks. In your case the end result if task_a failed will be:

enter image description here

Explanation: task_a fails, task_b is executed because task_a is finished (due to all_done rule), task_c consider only task_b status which is all_success thus task_c can also run.

If you don't want task_c to be executed when task_a fails you need to define:

task_a >> task_b>> task_c
task_a >> task_c

Which will give:

enter image description here

in that scenario task_c is set to upstream_failed.

Elad Kalif
  • 14,110
  • 2
  • 17
  • 49