Repository navigation
fix(plugin): pair end hook when result delivery fails - #739
Closed
zhongkechen wants to merge 4 commits into
Closed
zhongkechen wants to merge 4 commits into
zhongkechen wants to merge 4 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
Codex AI reviewNo actionable findings. Residual risk is limited to uncommon throwable variants not explicitly covered by the added serialization and checkpoint-failure tests. Reviewed commit |
This branch was successfully deployed
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.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue Link, if available
Extracted as an independent fix from #721.
Description
The successful-handler path serialized the result and checkpointed an oversized payload before firing
onInvocationEnd. If serialization or the checkpoint failed, plugins received a start hook without the matching end hook. That leaves telemetry unfinished: buffered exporters are not flushed and OTel spans are not ended.Capture result-delivery failures, unwrap
CompletionExceptionfrom a failed checkpoint, fireonInvocationEndwithRETRYING, then rethrow the original failure. The result passed to the hook remains null because it was not delivered. No public API changes.Demo/Screenshots
Not applicable.
Checklist
Testing
Unit Tests
Added a real oversized-result checkpoint failure test through
DurableExecutorand the checkpoint batcher. It verifies the EXECUTION/SUCCEED request, exactly one paired start/end hook,RETRYING, a null undelivered result, and the same original exception at the hook and caller.DurableExecutionTest: 11 tests passed. Isolated mutation checks confirm the new test fails if either the end-hook fix or exception unwrapping is removed.Integration Tests
The local-runner serialization failure regression remains covered by
PluginIntegrationTest(34 tests passed). The simulated wrapped-SerDes test was replaced by the actual checkpoint test above. Formatting checks passed.Examples
Not applicable.