Repository navigation
#301 - ProcessManager: restore the parent process history after a failed process, and reset it between executions - #302
Merged
Merged
Conversation
…led process, and reset it between executions - execute(): restore the history of the parent process (if any) in a finally block. doExecute() only restored it when the process succeeded: after a failed sub-process caught by its parent (process_executor task with the skip error strategy), the next logs of the parent were attributed to the sub-process by the Monolog processors, and the history of a failed process was left after its execution. Restored after the "Critical process failure" log and the cleverage_process.fail event, which are still attributed to the failed process. - Implement ResetInterface (kernel.reset tag): processed iterables / blockings, history and current task are reset between two messages of a long-running worker. - ProcessManagerStopCheckerTest relied on the history left after the failure: check it when the failed event is dispatched. Co-Authored-By: Claude Opus 5.5 (1M context) <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 #301.
ProcessManager::execute()restores the history of the parent process (if any) in afinallyblock.doExecute()only restored it when the process succeeded: after a failed sub-process caught by its parent (process_executortask with theskiperror strategy), the next logs of the parent were attributed to the sub-process (process_id/process_code/process_contextof the Monolog processors), and the history of a failed process was left after its execution.The restore is done after the
Critical process failurelog and thecleverage_process.failevent, which are still attributed to the failed process (afinallyindoExecute()would have lost it).ProcessManagerimplementsResetInterface(kernel.resettag): processed iterables / blockings, history and current task are reset between two messages of a long-running worker (Messenger / scheduler of the UI bundle).ProcessManagerStopCheckerTestrelied on the history left after the failure: it now checks it when the failed event is dispatched.Checked in process-bundle-demo with the reproduction of the issue: the
loggertask of the parent logs"process_code":"demo.subprocess_failure"(was the child),Critical process failurekeeps the child code;debug:containershows thekernel.resettag.Out of scope: the current task (
getTaskConfiguration()) of the parent is set tonullonce a sub-process has ended (successfully or not), until the next task; unchanged.Requirements
Breaking changes
None: only the history returned by
getProcessHistory()after a failed process changes (it was the failed one, now the parent one ornull);reset()is a new method.🤖 Generated with Claude Code