handsome-postman-16645
01/10/2025, 5:07 PM@catch
operator is going to need to be added to all previous steps, but there are 18 previous steps in my DAG, so this adds a lot of boilerplate. Is there a simpler way to just say "run this tear-down step regardless of the status of all previous steps"?hundreds-rainbow-67050
01/10/2025, 5:29 PMhundreds-rainbow-67050
01/10/2025, 5:31 PMancient-application-36103
01/10/2025, 6:09 PMhandsome-postman-16645
01/13/2025, 2:52 PMhandsome-postman-16645
01/13/2025, 2:54 PMAnother way I can think of would be to trigger your flow with another one that can then do your cleanupThis approach definitely seems like a good one! Might try this out. Thanks!
hundreds-rainbow-67050
01/13/2025, 3:08 PMhandsome-postman-16645
01/13/2025, 3:11 PMhundreds-rainbow-67050
01/13/2025, 3:23 PMtask_pre_step
and task_finished
. Caveat: there isn't fine-grained control over decorator ordering at the moment, so if you need your PVC available from within another decorator then things can get tricky due to the order of the setup/teardown
https://netflix.slack.com/archives/C02116BBNTU/p1730834209671669?thread_ts=1730831644.349479&cid=C02116BBNTUhandsome-postman-16645
01/13/2025, 3:24 PM@kubernetes
decorator if the PVC already exists. Otherwise, they'll hang in a pending
state forever. Ordering is super important herehandsome-postman-16645
01/13/2025, 3:25 PMhundreds-rainbow-67050
01/13/2025, 3:27 PM@kubernetes
and teardown after? You could just have the decorator wrap @kubernetes
then?handsome-postman-16645
01/13/2025, 3:27 PM@kubernetes
decorators in my flow. It needs to be created before the sequence starts, and deleted after the sequence ends.handsome-postman-16645
01/13/2025, 3:28 PM@kubernetes
decorator in my flowhundreds-rainbow-67050
01/13/2025, 3:29 PMflow_finalize
(which doesn't exist yet). Maybe @ancient-application-36103 has other ideashandsome-postman-16645
01/13/2025, 3:30 PMhundreds-rainbow-67050
01/13/2025, 3:34 PMhandsome-postman-16645
01/13/2025, 3:35 PMhundreds-rainbow-67050
01/13/2025, 3:35 PMhandsome-postman-16645
01/13/2025, 3:38 PMancient-application-36103
01/13/2025, 4:43 PMancient-application-36103
01/13/2025, 4:44 PMhandsome-postman-16645
01/13/2025, 4:50 PMsubprocess
. These binaries take input files and produce output files, which are intermediate outputs in my flow. In this case, it doesn't really make sense to load each large intermediate file into memory in Python just to bring it into GCS/S3 via Metaflowhandsome-postman-16645
01/13/2025, 4:52 PMsquare-wire-39606
01/13/2025, 4:56 PMhandsome-postman-16645
01/13/2025, 4:59 PM