Hello everyone! Happy New Year!
Recently I was looking for ability to resume/rerun failed task in flow without rerunning all steps in it, only crashed task. Is it possible? I've read a post: https://discourse.prefect.io/t/how-to-resatrt-part-of-the-flow-in-prefect-2-0/1782/2 where someone has similar issue as me and "the feature" has been implemented, but there is no link to it. Thanks fro help!
b
Bianca Hoch
01/02/2024, 3:52 PM
Hi Kacper, I think task caching may help you out here. As long as the input has not changed between flow retries, tasks which are cached will reflect a state of
COMPLETED
without running again. Any tasks that failed, however, should be rerun whenever the flow is retried.
k
Kacper Kwasnioch
01/04/2024, 8:12 AM
So if I set cache for tasks in flow then I will be able to rerun single task without rerunning whole flow? Is there also option in UI to rerun single task?
b
Bianca Hoch
01/05/2024, 2:17 PM
If you cache the results of your tasks, and rerun the flow after it fails, successful tasks will not be rerun. All
Failed
tasks should rerun, though.
Bianca Hoch
01/05/2024, 2:18 PM
There isn't an option to retry just a single task in the UI, only the failed flow.
Bianca Hoch
01/05/2024, 2:53 PM
I'm curious though, would you mind sharing a bit about how you'd ideally like to handle task failures? Or if you could provide an example of the scenario you're trying to account for, that'd be helpful as well.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.