compose/pkg/compose
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
..
testdata refactor(compose): move publish and transform to internal/publish 2026-11-13 10:39:05 +01:00
api_versions.go test(images): pin the images backend adapter, and fix comments left by the move 2026-11-04 17:36:19 +01:00
apiSocket.go fix(use_api_socket): give each service its own credentials file mode 2026-11-02 15:41:36 +01:00
apiSocket_test.go fix(use_api_socket): give each service its own credentials file mode 2026-11-02 15:41:36 +01:00
build.go
build_bake.go feat(build): pass parallel limit to bake as --jobs 2026-10-28 09:07:10 +01:00
build_bake_test.go refactor(compose): use a single event processor that discards events 2026-10-29 11:59:43 +01:00
build_classic.go refactor(compose): move the dependency graph to internal/depgraph 2026-11-05 11:42:19 +01:00
build_test.go
compose.go refactor(compose): keep the depends_on label codec in one place 2026-10-29 11:59:43 +01:00
compose_test.go refactor: add internal/concurrency for the bounded errgroup helpers 2026-10-29 10:18:58 +01:00
container.go
containerops.go refactor(compose): state the engine of the extracted packages once 2026-10-29 11:59:43 +01:00
containers.go refactor(compose): share the bounded per-container fan-out 2026-10-29 11:59:43 +01:00
containers_test.go
convert.go
cp_test.go refactor(containerops): move exec, cp, export and commit to internal/containerops 2026-10-27 11:19:35 +01:00
create.go fix(compose): report network and volume progress once, on their own row 2026-11-05 17:47:09 +01:00
create_test.go refactor(compose): convert blkio throttle devices with one helper 2026-10-29 11:59:43 +01:00
dependency_wait.go refactor(compose): build progress events with internal/progress 2026-10-29 11:59:43 +01:00
dependency_wait_test.go test(compose): one inspect builder, a hook runner fixture, no unused map 2026-11-04 12:36:11 +01:00
depends_on_label.go refactor(compose): keep the depends_on label codec in one place 2026-10-29 11:59:43 +01:00
depends_on_label_test.go refactor(compose): keep the depends_on label codec in one place 2026-10-29 11:59:43 +01:00
desktop.go
docker_cli_providers.go
down.go fix(down): keep volumes other services use on down -v with services 2026-11-13 17:10:30 +01:00
down_test.go fix(down): keep volumes other services use on down -v with services 2026-11-13 17:10:30 +01:00
engine.go refactor(compose): state the engine of the extracted packages once 2026-10-29 11:59:43 +01:00
envresolver.go fix(compose): skip the lowered-environment allocation in envResolverWithCase 2026-10-26 11:54:13 +01:00
envresolver_test.go fix(compose): skip the lowered-environment allocation in envResolverWithCase 2026-10-26 11:54:13 +01:00
executor.go refactor: add internal/concurrency for the bounded errgroup helpers 2026-10-29 10:18:58 +01:00
executor_events.go fix(compose): report network and volume progress once, on their own row 2026-11-05 17:47:09 +01:00
executor_events_test.go fix(compose): report network and volume progress once, on their own row 2026-11-05 17:47:09 +01:00
executor_ops.go refactor(compose): build progress events with internal/progress 2026-10-29 11:59:43 +01:00
executor_start_test.go fix(compose): report network and volume progress once, on their own row 2026-11-05 17:47:09 +01:00
executor_test.go refactor(compose): use a single event processor that discards events 2026-10-29 11:59:43 +01:00
executor_wait_slot_test.go refactor(executor): hand the hook-log listener to runStart only 2026-10-26 17:17:16 +01:00
filters.go refactor(compose): share the label filter builders 2026-10-29 11:59:43 +01:00
hook.go refactor(compose): derive container names with internal/naming 2026-10-29 11:59:43 +01:00
hook_test.go
image_pruner.go refactor(compose): move images and image pruning to internal/images 2026-11-04 17:36:19 +01:00
images.go refactor(compose): move images and image pruning to internal/images 2026-11-04 17:36:19 +01:00
images_test.go test(images): pin the images backend adapter, and fix comments left by the move 2026-11-04 17:36:19 +01:00
inspect.go refactor(compose): state the engine of the extracted packages once 2026-10-29 11:59:43 +01:00
kill.go refactor(compose): share the pause/unpause and project-resolution preambles 2026-10-29 11:59:43 +01:00
kill_test.go refactor(compose): share the label filter builders 2026-10-29 11:59:43 +01:00
lifecycle_wiring_test.go test(lifecycle): pin the forced recreation and the skipped providers of a rebuild 2026-11-04 12:36:11 +01:00
logs.go refactor(compose): move logs and attach to internal/logstream 2026-11-04 09:40:04 +01:00
logs_cursor_test.go refactor(compose): move logs and attach to internal/logstream 2026-11-04 09:40:04 +01:00
logs_test.go refactor(compose): move logs and attach to internal/logstream 2026-11-04 09:40:04 +01:00
model.go refactor(compose): build progress events with internal/progress 2026-10-29 11:59:43 +01:00
model_test.go refactor(compose): use a single event processor that discards events 2026-10-29 11:59:43 +01:00
monitor_test.go test(compose): fix the monitor fixture return type 2026-11-04 14:43:45 +01:00
navigation_menu.go
observed_state.go build(lint): enable the dupl linter 2026-10-29 11:59:43 +01:00
observed_state_test.go refactor(compose): use a single event processor that discards events 2026-10-29 11:59:43 +01:00
pause.go refactor(compose): share the pause/unpause and project-resolution preambles 2026-10-29 11:59:43 +01:00
plan.go docs(compose): drop the comments that describe the deleted imperative start path 2026-10-27 11:20:26 +01:00
plan_test.go
plugins.go refactor(provider): move the provider plugin execution to internal/provider 2026-10-15 09:10:05 +02:00
plugins_test.go refactor(provider): move the provider plugin execution to internal/provider 2026-10-15 09:10:05 +02:00
port_test.go refactor(compose): share the label filter builders 2026-10-29 11:59:43 +01:00
pre_start.go refactor(compose): share the label filter builders 2026-10-29 11:59:43 +01:00
pre_start_test.go fix(pre_start): capture a hook's output by opening its log stream once started 2026-10-16 15:11:33 +02:00
progress.go refactor(compose): share the pull and push progress stream decoding 2026-10-29 11:59:43 +01:00
progress_test.go refactor(compose): share the pull and push progress stream decoding 2026-10-29 11:59:43 +01:00
projectloader.go refactor(projectloader): move project loading and generation to internal/projectloader 2026-10-13 10:03:53 +02:00
provider_images.go test(images): pin the images backend adapter, and fix comments left by the move 2026-11-04 17:36:19 +01:00
provider_images_test.go refactor(compose): use a single event processor that discards events 2026-10-29 11:59:43 +01:00
ps_test.go refactor(compose): share the label filter builders 2026-10-29 11:59:43 +01:00
publish.go refactor(compose): move publish and transform to internal/publish 2026-11-13 10:39:05 +01:00
pull.go refactor(compose): share the pull and push progress stream decoding 2026-10-29 11:59:43 +01:00
pull_test.go
push.go refactor(compose): share the pull and push progress stream decoding 2026-10-29 11:59:43 +01:00
push_test.go refactor(compose): use a single event processor that discards events 2026-10-29 11:59:43 +01:00
rebuild_scheduler.go
rebuild_scheduler_test.go
reconcile.go fix(docs): surface a provider-backed service's scale over its control channel 2026-11-16 10:22:24 +01:00
reconcile_start_test.go test(wait): lock the depends_on gate, health statuses and wait events 2026-11-04 12:36:11 +01:00
reconcile_test.go fix(docs): surface a provider-backed service's scale over its control channel 2026-11-16 10:22:24 +01:00
relay.go refactor(compose): gate the down operations on the limiter in one place 2026-10-29 11:59:43 +01:00
relay_test.go refactor(compose): share the label filter builders 2026-10-29 11:59:43 +01:00
remove.go refactor(compose): derive container names with internal/naming 2026-10-29 11:59:43 +01:00
restart.go refactor(compose): move the dependency graph to internal/depgraph 2026-11-05 11:42:19 +01:00
restart_test.go test(compose): one inspect builder, a hook runner fixture, no unused map 2026-11-04 12:36:11 +01:00
run.go fix(run): warn about ignored uid/gid/mode for a run target scaled to zero 2026-11-05 09:47:51 +01:00
run_test.go fix: keep the image pull of compose run inside the run progress block 2026-10-13 10:02:09 +02:00
scale.go feat: scale and watch rebuild use the unified plan 2026-10-15 17:04:18 +02:00
scale_test.go
secrets.go fix(run): warn about ignored uid/gid/mode for a run target scaled to zero 2026-11-05 09:47:51 +01:00
secrets_test.go fix(run): warn about ignored uid/gid/mode for a run target scaled to zero 2026-11-05 09:47:51 +01:00
service_containers.go refactor(compose): move the dependency graph to internal/depgraph 2026-11-05 11:42:19 +01:00
service_containers_test.go refactor(compose): share the label filter builders 2026-10-29 11:59:43 +01:00
shellout.go
start.go refactor(compose): drop the timeout parameter of waitDependencies 2026-10-27 12:08:39 +01:00
start_test.go test(compose): one inspect builder, a hook runner fixture, no unused map 2026-11-04 12:36:11 +01:00
stop.go refactor(compose): move the dependency graph to internal/depgraph 2026-11-05 11:42:19 +01:00
stop_test.go refactor(compose): share the label filter builders 2026-10-29 11:59:43 +01:00
umask_test.go refactor: move the config-hash helpers to internal/confighash 2026-10-29 08:20:15 +01:00
up.go refactor(compose): move logs and attach to internal/logstream 2026-11-04 09:40:04 +01:00
up_options_test.go api: reject incompatible Up options with a typed error 2026-10-26 14:49:08 +01:00
up_phases_test.go test(up): report the hook write error from the test goroutine 2026-11-04 12:36:11 +01:00
up_signal_test.go test(up): report the signal errors from the test goroutine through a channel 2026-11-04 12:36:11 +01:00
up_test.go refactor(compose): move logs and attach to internal/logstream 2026-11-04 09:40:04 +01:00
viz_test.go
volumes_test.go refactor(compose): share the label filter builders 2026-10-29 11:59:43 +01:00
wait.go
wait_test.go
watch.go fix(watch): recognize bind-mounted paths starting with two dots 2026-10-29 14:17:40 +01:00
watch_test.go fix(watch): recognize bind-mounted paths starting with two dots 2026-10-29 14:17:40 +01:00