Repository navigation
#396 - Make the process fail when a finalization fails, stop the running sub-processes of process_launcher when the process fails - #397
Merged
Conversation
…ing sub-processes of process_launcher when the process fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Description
Fixes #396.
ProcessManager::doExecute()still finalizes every task. If thefinalize()of a task has failed, it then throws aProcessFailedExceptionnaming that task, before logging the end of the process. The failure goes through the usual path: one "Process … failed" log,cleverage_process.failevent, the command exiting with1, theprocess_executortask of a parent process failing. Until now, the process was flagged and logged as failed butexecute()returned normally.finalize()is unchanged, the failure is detected from the state of the task.process_launcher:ProcessLauncherTaskimplementsFinalizableTaskInterface. Itsfinalize()stops the sub-processes still running (5 s timeout) and logs a warning. It also removes the JSON buffers that will never be output, of the running sub-processes and of those terminated but not handled yet. It resets the task as well. This only happens when the process fails or is stopped (stop request,StopTask): when it succeeds, the task has already waited for every sub-process. Until now, the sub-processes went on with their side effects after the end of the process, and their error output was no longer read.Requirements
Breaking changes
None in the API. Two behaviour changes:
process_launcherare stopped when their parent process fails or is stopped.🤖 Generated with Claude Code