Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The Shutdown-call assertion fails on Windows because interrupt signaling is unsupported, causing the extension to be killed before its Shutdown hook runs.
1 open issue
What changed in this PR
This PR keeps SDK dependency callbacks available during extension shutdown by closing the callback connection after the Shutdown hook returns.
Changes:
- Move callback connection cleanup after Shutdown.
- Extend the greeter dependency fixture to call its dependency during both Init and Shutdown.
- Add an integration assertion that the shutdown dependency call reaches the host.
| File | Description |
|---|---|
testdata/greeterdep/greeterdep.go |
Retain the resolver and call the greeter dependency during Shutdown. |
testdata/greeterdep/cmd/greeterdep/main.go |
Update the command comment to describe shutdown behavior. |
sdk/serve.go |
Keep the callback connection open until Shutdown returns. |
host/dependency_test.go |
Check that the host receives the shutdown dependency call. |
Review effort: Balanced
Close the callback connection after Shutdown returns. Out-of-process extensions could not call their dependencies from a Shutdown hook. ListenWithIO closed the callback connection before running Shutdown, so any call failed with "grpc: the client connection is closing", even though the host keeps serving dependencies until the extension process exits. Signed-off-by: Paweł Gronowski <git@grono.dev>
vvoland
force-pushed
the
shutdown-call
branch
from
November 20, 2026 19:09
a507f47 to
a8c1a77
Compare
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.

Close the callback connection after Shutdown returns.
Out-of-process extensions could not call their dependencies from a Shutdown hook.
ListenWithIO closed the callback connection before running Shutdown, so any call failed with "grpc: the client connection is closing", even though the host keeps serving dependencies until the extension process exits.