Reputation: 273
I have a DAG, it has 5 tasks A,B,C,D,E. and 5 tasks triggered by failed tasks above, one for each, A_f, B_f, C_f, D_f and E_f (and similarly five on success). And at last, task X, which writes failure results to a database. Lets say, if 2 of first five tasks failed (A and D), only A_f and D_f get triggered. What can I do to run task X? Will all_done work? even if some of the upstream tasks were never triggered? I am not so sure about it.
Upvotes: 1
Views: 696
Reputation: 39
Yes all_done
should work. As long as none of Task X's upstream tasks have a state of None
, which for any given dag run shouldn't be possible because tasks' states are inferred from previous tasks' states (i.e. skipped state is propagated or any children of a failed task are set to upstream failed
), then the all_done
trigger will work.
Upvotes: 1