compose/pkg
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
..
api chore: address the review notes left 2026-11-11 20:43:01 +01:00
bridge refactor(compose): share the label filter builders 2026-10-29 11:59:43 +01:00
compose fix(docs): surface a provider-backed service's scale over its control channel 2026-11-16 10:22:24 +01:00
dryrun feat(registry): use the Docker Desktop Hub session for Docker Hub credentials 2026-10-07 14:24:28 +02:00
e2e fix(down): keep volumes other services use on down -v with services 2026-11-13 17:10:30 +01:00
mocks refactor(api): regenerate mocks for the split Compose interfaces 2026-10-12 12:03:29 +02:00
remote fix(oci): tell a null "manifests" from a list, and report a host failure as such 2026-11-12 10:43:27 +01:00
utils fix: make e2e tests pass reliably locally with Docker Desktop 2026-05-18 10:55:41 +02:00
watch golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00