Hello everyone! Happy New Year! Recently I was loo...
# prefect-getting-started
k
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
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
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
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.
There isn't an option to retry just a single task in the UI, only the failed flow.
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.