Skip to content

daemon: Publish points offered by extensions on the API socket - #54306

Draft
vvoland wants to merge 2 commits into
moby:masterfrom
vvoland:ext-fix-services
Draft

vvoland wants to merge 2 commits into
moby:masterfrom
vvoland:ext-fix-services

Conversation

@vvoland

@vvoland vvoland commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

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:

  • 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.

Release notes (optional)

A picture of a cute animal (not mandatory but encouraged)

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>
@vvoland vvoland added this to the 29.11.0 milestone Nov 27, 2026
@vvoland vvoland self-assigned this Nov 27, 2026
@vvoland vvoland added kind/bugfix PR's that fix bugs area/extensions Moby Extensions and their providers labels Nov 27, 2026
@vvoland
vvoland requested a balanced review from Copilot November 27, 2026 21:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/extensions Moby Extensions and their providers kind/bugfix PR's that fix bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants