Repository navigation
fix(worker): release an acquired batch on stop or failure; tests for #4, #8, #10, #14 - #34
Merged
Merged
Conversation
…fixes [*] Pins the behaviour #8 and #10 ask for (ProcessVariablePlaceholderResolver and FlowableClient::getTaskVariables) and the client-level parts of #14: the path prefix of every public client method, including the external worker API, and the request of an Event Registry deployment upload. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… [*] The runner registered a job as held only while it was being processed and forgot it in the same iteration, so the release at the end of run() never found anything. A failed report, a wiring error or a stop request left the other jobs of the batch locked until lockDuration expired. Every job of an acquired batch is now held from the acquire until the engine accepted its report or unacquire, and a stop request is checked before each job. What is still held when run() ends is unacquired with reason "shutdown", including a job whose report the engine did not accept. Adds the worker tests asked for in #14 (runner, handler registry, job mapping, outcome payloads); nine of them fail against the old runner. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…d handler wiring [*] Records the current behaviour asked for in #4 and in items 7 to 11 of #14: default sort, filter allow-list, relation filters and page size of every list provider; the suffix rule and the event instance input over HTTP and the CLI; the input file of every write operation; and a handler that is wired by implementing the interface alone. The test kernel gets the option external_worker_handlers for the last one. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… section of the README [*] Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 27, 2026
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.
Checks the four test issues against the suite, adds the tests that were still missing, and fixes one bug the worker tests found. Release: 0.16.0 (minor, because the worker fix is observable for consumers).
Fix: the external worker releases the rest of an acquired batch
ExternalWorkerRunnerregistered a job as held only while it processed it and forgot it in the same iteration, so the release at the end ofrun()never found anything. When a report failed, a topic was claimed by two handlers or the worker was stopped, the other jobs of the batch stayed locked untillockDuration(defaultPT10M) expired, and a stop request was only checked between topics.Now every job of an acquired batch is held from the acquire until the engine accepted its report or unacquire, a stop request is checked before each job, and what is still held when
run()ends is unacquired withreason: "shutdown". Details and what consumers see are in the CHANGELOG.Nine tests fail against the runner of 0.15.0 and pass with the fix:
Tests per issue
tests/State/ListQueryTest.php: default per provider (11 with a time field descending, 6 without), explicit sort wins, direction fallback, page size limitstests/Schema/ProcessVariablePlaceholderResolverTest.php,tests/Client/FlowableClientTaskVariablesTest.php(neutral values instead of the drop-in test of the issues)tests/Worker/ExternalWorkerRunnerTest.php,ExternalWorkerHandlerRegistryTest.php,ExternalWorkerJobTest.php,ExternalWorkerOutcomeTest.phptests/Client/FlowableClientEventDeploymentRequestTest.phptests/Http/EventRegistryInputTest.php(HTTP and CLI reject the same input with the same message)tests/State/ListQueryTest.php(allow-list and relation filters of all 17 list providers)tests/Client/FlowableClientPathPrefixTest.php(all 63 public client methods, fails when a method is added without being listed)tests/Schema/InputSchemaPathTest.php,tests/Kernel/ExternalWorkerHandlerAutoconfigurationTest.phpThe suite grows from 1428 to 1973 tests. No production code changes besides
ExternalWorkerRunner; the input schema snapshot is unchanged.Left open and noted on the issues: a test against a live engine (#31), including the scope order of task variables.
Closes #4
Closes #8
Closes #10
Closes #14
🤖 Generated with Claude Code