Some of my tasks might fail, and they would not work well before someone have the dependencies repaired, which might take uncertain amount of time. And we want the flow to restart from the place where it crashed. Is there any way to do this in Prefect 2.4.0 or more?
We have an open PR for it here - so this feature is coming!
PrefectHQ:main
← PrefectHQ:flow-restarts
opened 01:07AM - 13 Oct 22 UTC
closes #7127
Implements the ability to restart flow runs in terminal states b… y proposing a scheduled state (with any name).
This PR also includes a refactor of flow retry logic
- we no longer check for failed task runs and marking them rerunnable on retry/restart
- instead, we track whether or not a flow is "restarting" or has retries available
- while attempting to retry a flow, the engine attempts to orchestrate any tasks it discovers
- if the task is failed/crashed/cancelled, a new `PermitRerunningFailedTaskRuns` rule will allow a transition back into a running state and bookkeeping is performed lazily
This should significantly reduce the overhead of retrying flows with many task runs
@madkinsz I've bumped the "minor" API version here as I believe these changes break backwards compatibility (they require a client update)--mind if I get a sanity check on this?
### Checklist
- [x] This pull request references any related issue by including "closes `<link to issue>`"
- If no issue exists and your change is not a small fix, please [create an issue](https://github.com/PrefectHQ/prefect/issues/new/choose) first.
- [x] This pull request includes tests or only affects documentation.
- [x] This pull request includes a label categorizing the change e.g. `fix`, `feature`, `enhancement`
@GodSlayer_Inferno this feature got released in Prefect 2.6.5
Thanks! I can’t wait to try it out!
1 Like