Repository navigation
#307 - InputAggregatorTask: drop the items skipped by a branch, remove the deprecation - #308
Merged
Merged
Conversation
…e the deprecation - InputAggregatorTask no longer joins the inputs of two items when a branch skips one (filter, error with the skip strategy): the inputs received from the other branches are dropped when a common ancestor has been executed again since they were received (keep_inputs excepted). Inputs without a common ancestor are still joined. - New ProcessState::getExecutionCount(), incremented by the ProcessManager before each execution of a task (execute, proceed, flush). - Remove the deprecation of InputAggregatorTask (2018, notice added by #305, not released): the limits of the blocking tasks it referred to no longer exist, and a blocking task is not a replacement. Marked @Final since 5.4 like the other concrete tasks. - Tests: unit tests of the task (first / last branch skipping, keep_inputs, no common ancestor), functional tests running the processes (filter and error with the skip strategy). Documentation and CHANGELOG updated. 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 #307. Reproduction: demo processes
demo.blocking.*anddemo.input_aggregator.*(cleverage/process-bundle-demo#88).The fix
ProcessState: newgetExecutionCount()(number of executions of the task: execute, proceed or flush, not reset between the items) and@internal incrementExecutionCount(), called byProcessManager::processExecution()before each execution.InputAggregatorTaskrecords, for each received input, the execution count of its ancestors (getPreviousState()chain). When an input arrives, the inputs received from the other branches are dropped if a common ancestor has been executed again since: they belong to a previous item that a branch skipped. Unchanged:keep_inputsare never dropped;clean_input_on_overridebehaviour;demo.input_aggregator.skipped_branch(branch_askips the item 2,branch_bthe item 4):{"a":"a1","b":"b1"},{"b":"b2","a":"a3"},{"b":"b3","a":"a4"},{"a":"a5","b":"b5"}{"a":"a1","b":"b1"},{"a":"a3","b":"b3"},{"a":"a5","b":"b5"}Deprecation removed
InputAggregatorTask: constructor withtrigger_deprecation()(Bundle best practices: residues (generic transformers autowiring, help command container, deprecation notices) #305, not released),@deprecated(2018) and the@see README.md:Known issuespointing to a removed section. The limits of the blocking tasks given as the reason no longer exist (InputAggregatorTask: remove the deprecation, fix the items mixed when a branch skips one #307), and a blocking task is not a replacement (it outputs once for all the items). Marked@final since 5.4, like the other concrete tasks (Define the public API: mark classes final or internal #279).Deprecated,Notesrewritten, example in an iterable process), good practices page (mentioned again for the dependencies between branches), CHANGELOG (entry of Bundle best practices: residues (generic transformers autowiring, help command container, deprecation notices) #305 corrected),KernelTest(no more ignored deprecation).Tests
InputAggregatorTaskTest: deprecation test removed; new tests with a common ancestor: item skipped by the first branch, by the last branch,keep_inputs, no common ancestor.KernelTest::testInputAggregatorDropsTheItemsSkippedByABranch(): the processes run by theProcessManager(filterin both branches, error witherror_strategy: skip). Both fail without the fix (checked).Checked in the container (977 tests): highest dependencies (PHP 8.5, Symfony 8.1), lowest dependencies (PHP 8.2, Symfony 6.4.0), Symfony 6.4.48 on PHP 8.2 and 8.5, Symfony 7.4: no deprecation, no risky test (with pcov coverage). PHPStan, PHP-CS-Fixer and Rector OK. Demo processes run with this branch:
demo.input_aggregator.skipped_branchgives the expected output, the 4 others are unchanged.Requirements
Breaking changes
None. The deprecation removed was never released. Only the outputs that were wrong change: the inputs of an item skipped by a branch are dropped instead of being joined with the next item.
🤖 Generated with Claude Code