<@ULVA73B9P> When a flow retries does that new ret...
# ask-marvin
a
@Marvin When a flow retries does that new retry becomes a new run_flow?
m
When a flow retries in Prefect, it does not create a brand new flow run each time. Instead, it uses the same flow run ID and continues attempting to run the flow according to the retry policy set for that flow. This means that each retry is an attempt of the same flow run, rather than creating a completely new instance. The concept you're asking about might get a little technical, but think of it like rebooting your computer; it's still the same computer, just a fresh attempt at running it smoothly. For more details on how flow runs and retries work in Prefect, you might want to check their API interaction documentation. If you need further clarification or have more questions, feel free to ask!
a
@Marvin what about when a task retries? does it get a new task_run?
m
When a task in Prefect retries, it does not create a new task run ID for each attempt. Similar to flow retries, the task maintains the same task run ID, and each retry is recorded as an attempt under that same run. This allows you to track the retry attempts and their outcomes without creating entirely new task run instances. If you're interested in the specifics of setting up retry logic and customizing retry behavior in tasks, Prefect provides options like
retry_delay_seconds
and
retry_condition_fn
to control the timing and conditions under which a task is retried. You can find more details in their task writing documentation. Let me know if you need more info or if I can help further!