compose/docs
Nicolas De Loof b8f718d7f5 fix(docs): surface a provider-backed service's scale over its control channel
A provider's relay is a singleton network stand-in, never itself a
replica: reconcileService's provider branch always plans exactly one
OpRunProvider node, regardless of the scale requested through
`compose scale` or `scale:`. That value is neither rejected nor acted
on by Compose -- it is already passed through unmodified as part of
the full service config a provider receives over its control channel
(GetServiceConfigType marshals the whole resolved ServiceConfig).
Interpreting it -- scaling the real resource the provider manages,
ignoring it, or rejecting it itself -- is entirely the provider's own
call.

The example provider used by the e2e suite is extended to read that
response into the real types.ServiceConfig (the same struct Compose
marshaled) and call GetScale() on it -- the canonical accessor, which
already reconciles the scale: and deploy.replicas: spellings -- then
surfaces the result as CONFIG_SCALE, exercising the path end to end
the same way it already does for CONFIG_TYPE.

Two regression tests:
- TestReconcileService_ProviderScaleNeverMultipliesTheRelay locks the
  plan-level invariant: a declared scale of 3 still produces exactly
  one OpRunProvider node.
- TestProviderScaleReachesTheProvider (e2e) locks the value actually
  reaching the provider through a real daemon, that `compose scale`
  itself converges without error on a provider-backed service, and
  that the relay stays a single container across two different scale
  requests.

Verified: go build, go test ./pkg/compose/..., and golangci-lint all
clean; the full provider e2e subset re-run clean against a locally
built binary.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-16 10:22:24 +01:00
..
examples fix(docs): surface a provider-backed service's scale over its control channel 2026-11-16 10:22:24 +01:00
reference feat(build): pass parallel limit to bake as --jobs 2026-10-28 09:07:10 +01:00
yaml/main golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
extension.md docs(provider), e2e: image distribution documented and exercised 2026-10-02 17:35:20 +02:00
sdk.md refactor(up): inject the navigation menu instead of importing cmd/formatter 2026-10-12 10:50:38 +02:00