impl/continuation#265
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the server restarts while a workflow is running, the run used to get stuck as "running" and was eventually dropped with no record. Now those runs are picked up automatically and re-run from scratch with the same inputs, so they finish and show up in history.
How it works
Each running execution now stores what it needs to replay (inputs, trigger source, actor).
On startup the leader process finds interrupted runs and re-runs them in parallel. Recovery is instant on a graceful restart, or within about 60s after a hard crash.
A run is retried once. If it fails again, or the workflow was deleted, it is recorded as failed.
A per-workflow "Auto-recover runs" toggle (on by default) lives in the Properties panel when no node is selected. Turn it off to mark interrupted runs as skipped instead of re-running them.
Works the same on a single container and on multi-worker deployments. Only the leader recovers, so a run is never recovered twice.
UI
History shows skipped and failed status badges, plus a "Recovered" marker (icon in the list, full label on the detail panel).

Notes
Sub-workflows are not recovered on their own, the parent re-drives them.
Triggers with their own redelivery (RabbitMQ, cron, IMAP) can run a recovered job twice. This was a known, accepted tradeoff.