mirror of
https://github.com/docker/compose.git
synced 2026-11-18 06:07:53 +00:00
The Compose interface promised 'Scale manages numbers of container instances running per service', but ScaleOptions had no replica count: callers had to know they must mutate project.Services[x] via SetScale before calling, and ScaleOptions.Services only tuned the recreation policy. An SDK consumer following the interface doc got a no-op convergence of the whole project. ScaleOptions gains Replicas (service -> count); the backend applies it to the model itself before converging, and derives the targeted services from its keys when Services is not set. The CLI now does what a CLI should: parse SERVICE=REPLICAS tuples and hand them to the backend, instead of pre-mutating the model. Passing a pre-mutated project with an empty Replicas map still behaves as before, so existing SDK callers are unaffected. Part of #14074 (B: pkg/api promises things the implementation does not honor). Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com> |
||
|---|---|---|
| .. | ||
| api.go | ||
| api_test.go | ||
| context.go | ||
| env.go | ||
| errors.go | ||
| errors_test.go | ||
| event.go | ||
| labels.go | ||
| labels_test.go | ||