Daniel Manson
10/20/2021, 1:31 PMa = task_a()
test_value = task_get_test_value()
with case(test_value, 'test-against-this'):
b = task_b()
b.set_upstream(a)
...then task b would fail if a fails regardless of whether the case block is in the skipped or non skipped state. However that doesn't seem to be the way it works - rather if the case block skips, then it 'hides' whether or not a succeeded.Daniel Manson
10/20/2021, 1:33 PMtask_c and set b to be upstream, then you need to be very careful around not propagating the skipping. That seems at odds with the idea of a with block isolating logic..it's actually leaked outDaniel Manson
10/20/2021, 1:34 PMcase class to see if i can accomplish what i'm after, but i'm finding i'm running into gaps in documentation, e.g. around the trigger function on a taskKevin Kho
SKIP if the case is not met. task_b then has two upstream tasks with task_a and case. task_a will be FAILED and case will be SKIPPED and SKIPPED propagates.
You can try with the skip_on_upstream_skip flag
@task(skip_on_upstream_skip=True)
def task_b():
...
a = task_a()
test_value = task_get_test_value()
with case(test_value, 'test-against-this'):
b = task_b()
b.set_upstream(a)Daniel Manson
10/20/2021, 1:49 PMTrue the default for skip_on_upstream_skipKevin Kho
Daniel Manson
10/20/2021, 1:54 PMb is never skipped?Daniel Manson
10/20/2021, 1:54 PMa through b, but allow b to be skipped if the case is falseDaniel Manson
10/20/2021, 1:55 PMtrigger is all_successful and `b`'s upstream tasks are [a,case], so even if case is skipped, b should fail if a has failed, no?Kevin Kho
Kevin Kho
b is never SKIPPED but it won’t run with TriggerFailed. Still not ideal. Still looking into it.Daniel Manson
10/20/2021, 2:04 PMKevin Kho
FAILED and SKIPPED will SKIP the next task and we need to get failed. I think I will open an issue to see how we can address that. Would you like me to open an issue or do you want to?Daniel Manson
10/20/2021, 2:14 PMKevin Kho
Kevin Kho
Daniel Manson
10/20/2021, 2:32 PMDaniel Manson
10/20/2021, 2:32 PMKevin Kho