Repository navigation
Conversation
full diff: moby/extensions@fb779cf...vvoland:extensions:cd18efba84d2 Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Out-of-process extensions that offered a point other than service.grpc passed publication checks, but the daemon never proxied their services, so clients calling them through the API got Unimplemented. The daemon only read approved service names for service.grpc. The daemon now resolves service.v0 and publishes each offered point itself: - In-process offers are adapted with the daemon's server registrations and served directly. - Out-of-process offers, service.grpc included, are routed by the exact service names the extension's declaration attributes to each host-approved point. Services in other proto packages stay reachable, and services the extension did not offer stay private. - The declaration request is bounded to five seconds so a stalled extension cannot block API startup. In-process service.grpc providers are resolved directly through servicegrpcv0.Point, so servicegrpcv0.Collect and Registrar are removed. Service-name conflicts with services the daemon already serves still fail startup. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Valid declarations without a service.v0 provider marker now resolve no offers, causing previously published services to return Unimplemented.
No open issues 🎉
What changed in this PR
This PR moves extension-service publication into the daemon, allowing offered points beyond service.grpc to be reached through the API socket using exact service names.
Changes:
- Registers in-process offers directly and proxies out-of-process offers, with a five-second declaration timeout and service-name conflict checks.
- Updates the extensions dependency, including offer resolution, configuration lookup, proxy routing, and shutdown behavior.
- Adds an API-socket integration fixture and tests for offered-point access and SDK runtime privacy.
Review covered daemon publication, host offer handling, proxy restrictions, and integration coverage. Compatibility and privacy behavior warrant targeted testing; tests were not run.
| File | Description |
|---|---|
vendor/modules.txt |
Records the extensions dependency replacement. |
vendor/github.com/moby/moby/extpoints/servicegrpc/v0/servicegrpc.go |
Mirrors removal of collection and registrar helpers. |
vendor/github.com/moby/extensions/sdk/serve.go |
Keeps dependency callbacks available during shutdown. |
vendor/github.com/moby/extensions/README.md |
Documents embedder-owned publication. |
vendor/github.com/moby/extensions/internal/launcher/launcher.go |
Uses version-aware configuration lookup for processes. |
vendor/github.com/moby/extensions/internal/broker/broker.go |
Uses shared configuration lookup during initialization. |
vendor/github.com/moby/extensions/host/host.go |
Resolves approved offers instead of publishing services. |
vendor/github.com/moby/extensions/grpcproxy/proxy.go |
Adds package routes and SDK runtime restrictions. |
vendor/github.com/moby/extensions/core.go |
Revises extension-name validation and metadata documentation. |
vendor/github.com/moby/extensions/config.go |
Adds configuration-key validation and fallback lookup. |
integration/extension/testdata/offeredgreeter/offeredgreeter.go |
Defines an offered-point greeter fixture. |
integration/extension/testdata/offeredgreeter/cmd/offeredgreeter/main.go |
Runs the fixture through the extension SDK. |
integration/extension/socket_test.go |
Tests offered-point access and runtime privacy. |
go.sum |
Records replacement dependency checksums. |
go.mod |
Pins the extensions fork revision. |
extpoints/servicegrpc/v0/servicegrpc.go |
Removes obsolete collection and registrar helpers. |
extpoints/servicegrpc/v0/servicegrpc_test.go |
Tests rejection of offers without registered services. |
daemon/extensions.go |
Publishes approved offers and retrieves exact service inventories. |
daemon/command/daemon.go |
Passes startup context into service publication. |
Review effort: Balanced
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.
Summary
Out-of-process extensions that offered a point other than service.grpc passed publication checks, but the daemon never proxied their services, so clients calling them through the API got Unimplemented. The daemon only read approved service names for service.grpc.
The daemon now resolves service.v0 and publishes each offered point itself:
and served directly.
service names the extension's declaration attributes to each
host-approved point.
Services in other proto packages stay reachable, and services the
extension did not offer stay private.
extension cannot block API startup.
In-process service.grpc providers are resolved directly through servicegrpcv0.Point, so servicegrpcv0.Collect and Registrar are removed. Service-name conflicts with services the daemon already serves still fail startup.
Release notes (optional)
A picture of a cute animal (not mandatory but encouraged)