How to disable automatic retries of failed Metaflow tasks?

120 views Asked by At

By default, MetaFlow retries failed steps multiple times before the pipeline errors out. However, this is undesired when I am CI testing my flows using pytest-- I just want the flows to fail fast. How do I temporarily disable retries (without hard-coding @retry(times=0) on all steps)?

1

There are 1 answers

0
crypdick On BEST ANSWER

You can disable it with by setting the METAFLOW_DECOSPECS environment variable: METAFLOW_DECOSPECS=retry:times=0.

This temporarily decorates all steps with @retry(times=0)-- unless they are already decorated, in which case this won't override the hard-coded retry settings.

Source: @Ville in the MetaFlow Slack.