https://prefect.io logo
#prefect-community
Title
# prefect-community
f

Florian Guily

03/23/2022, 4:33 PM
Hello, i'm running into an issue were i have tasks that are skipped when none of their upstream tasks fail. When looking at the execution schema in the dashboard, i see that the task in charge of loading secrets like api key has been skipped because the first task that needed it has been skipped (this one is an intended behaviour). I suppose that my last task got skipped because the secret it needs as an argument has been previously skipped. Am i right ? if so how can i "force" the task to get the secret ? Here is the schema :
k

Kevin Kho

03/23/2022, 4:34 PM
I think this is because the
case
raises a SKIP when the condition is not met so the skip propagates. You can set a trigger to force execution
f

Florian Guily

03/23/2022, 4:35 PM
ok i thought it was ok because i used a merge after the case but i'll try with the trigger thanks !
k

Kevin Kho

03/23/2022, 4:36 PM
Set the trigger to
always_run
or something that will ignore the SKIP
f

Florian Guily

03/24/2022, 10:42 AM
Hey i tried to force the execution of the extract_data but as the ODS_URL and ODS_API_KEY were skipped, their value was None. So i force the execution of those tasks too but this implied that the first execution of extract_data that was supposed to be skipped was not anymore since its upstream are ODS_URL and ODS_API_KEY. I think i should add the Case also as an upstream of the first extract_data but i don't know how to
Dirty workaround, i created a duplicate of ODS_URL and ODS_API_KEY so each of the extract_data depnds on a different URL/KEY pair.
k

Kevin Kho

03/24/2022, 1:37 PM
For the case, anything under is a downstream:
Copy code
with case(...):
    task1()
    task2()
7 Views