Skip to content

#396 - Make the process fail when a finalization fails, stop the running sub-processes of process_launcher when the process fails - #397

Merged
njoubert-cleverage merged 1 commit into
mainfrom
396
Nov 3, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
396

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #396.

  • Finalization failure: ProcessManager::doExecute() still finalizes every task. If the finalize() of a task has failed, it then throws a ProcessFailedException naming that task, before logging the end of the process. The failure goes through the usual path: one "Process … failed" log, cleverage_process.fail event, the command exiting with 1, the process_executor task of a parent process failing. Until now, the process was flagged and logged as failed but execute() returned normally.
    • Only a failure of the finalization itself counts. A task already stopped with an exception before its finalization is not taken into account: that is the initialization failure of a task never reached, still deprecated (failure in v6).
    • No signature change: finalize() is unchanged, the failure is detected from the state of the task.
  • process_launcher: ProcessLauncherTask implements FinalizableTaskInterface. Its finalize() 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

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

None in the API. Two behaviour changes:

  • A process whose finalization fails now fails, where it used to "succeed". It was already logged as failed.
  • The sub-processes of process_launcher are stopped when their parent process fails or is stopped.

🤖 Generated with Claude Code

…ing sub-processes of process_launcher when the process fails

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage requested a review from a team as a code owner November 3, 2026 09:33
@njoubert-cleverage
njoubert-cleverage merged commit fa87173 into main Nov 3, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A finalization failure does not make the process fail; process_launcher leaves its sub-processes running when the process fails

1 participant