Repository navigation
fix: recover Continue process after unexpected exceptions - #7463
Merged
Merged
Conversation
exigow
force-pushed
the
exigow/robust-process
branch
from
August 29, 2025 14:13
c497db0 to
3451e8d
Compare
exigow
marked this pull request as ready for review
August 29, 2025 14:29
Contributor
Author
|
@Patrick-Erichsen, 🟢 + WIP commits squashed |
Contributor
|
💡 To request a new review, comment |
Solves CON-3587 Solves #7018 Solves #7121 Solves #5505 Solves #3981, and possibly other Stream closed-like errors ## Main change Now, if some exception bubbles up at any stage (whether it's read, write, anything else within `processScope`), we catch it via `CoroutineExceptionHandler` and we restart the process + back-off. Type of exception is not important / now it's more like black-box approach. This simplifies things quite a bit, since we now have only single piece of code for process recovery. ## Detailed changes * The process now recovers from exceptions globally, without specifying the type of exception (more of a black-box approach). * Remove `CoreMessengerManager`, since process recovery is now implemented in `ContinueProcessHandler`. * Add a back-off utility for calculating delays between process recovery retries (just a cleanup). * Restore `ContinuePluginService.dispose()` (because `Disposable` was accidentally removed during the last changes in the Next Edit - that's not critical, but it was causing exceptions when closing the application/during plugin disposal). * Remove the artificial delay between reading messages (from now on, blocking happens directly on `readLine`).
Patrick-Erichsen
approved these changes
Aug 29, 2025
Contributor
|
🎉 This PR is included in version 1.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Contributor
|
🎉 This PR is included in version 1.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Solves CON-3587
Solves #7018
Solves #7121
Solves #5505
Solves #3981, and possibly other
Stream closed-like errorsMain change
Now, if some exception bubbles up at any stage (whether it's read, write, anything else within
processScope), we catch it viaCoroutineExceptionHandlerand we restart the process + back-off. Type of exception is not important / now it's more like black-box approach.This simplifies things quite a bit, since we now have only single piece of code for process recovery.
Detailed changes
CoreMessengerManager, since process recovery is now implemented inContinueProcessHandler.ContinuePluginService.dispose()(becauseDisposablewas accidentally removed during the last changes in the Next Edit - that's not critical, but it was causing exceptions when closing the application/during plugin disposal).readLine).Manual testing
Restart Processaction works correctly, and the binary restarts immediately