Hey guys, I might be missing something in v2, but ...
# ask-community
m
Hey guys, I might be missing something in v2, but in v1 I belive we can re-run just the failed tasks from a flow run, can we do the same in v2?
šŸ‘€ 1
āœ… 1
https://discourse.prefect.io/t/how-can-i-restart-a-flow-in-prefect-2-0/1332/8 Im guessing this still stands, so re-runnin only failed tasks won't be possible on a flow?
Possibly once sub-flows have the better method of dynamically chaining this might not be an issue, but does feel like a substatial regression from v1 where I believe this is possible to do
r
You are correct that re-running only failed tasks is not currently supported. I would recommend implementing caching on your tasks, which can accomplish similar behavior https://docs.prefect.io/concepts/tasks/?h=caching#caching
m
@Rob Freedy I’m not sure if this is the correct you link were supposed to point me towards for caching?
@Anna Geller @Rob Freedy In regards to caching, do FAILED state tasks get cached? Also, are tasks cached from time of completion of the overall flow or from when the task was executed?
r
@Michael Law Apologies on the incorrect link! From the above (correct) link: "When each task run requested to enter a
Running
state, it provided its cache key computed from the
cache_key_fn
. The Orion backend identified that there was a COMPLETED state associated with this key and instructed the run to immediately enter the same COMPLETED state, including the same return values."
m
Nice one, thanks. Does this also imply that if it enters a state FAILED, it does not get cached?