compose icon indicating copy to clipboard operation
compose copied to clipboard

Any reason why scale was deprecated in favor of --scale ?

Open ghevge opened this issue 2 years ago • 1 comments

Description

Today you can make use of the docker-compose scale functionality to scale up running containers on the flay, by calling somehething like: docker-compose scale middleware=2

wich works ok, but lately it also returnes this message:

WARNING: The scale command is deprecated. Use the up command with the --scale flag instead.

Meaning that in the near future, scale command won't work anymore. From what I can see --scale only works in tandem with up command, which doesn't generates the results "scale" was offering.

So why are you planning to kill the scale command ?

On my end I am using it a lot to automate tests scaling.

Thanks

Steps To Reproduce

No response

Compose Version

No response

Docker Environment

No response

Anything else?

No response

ghevge avatar Jul 18 '23 15:07 ghevge

scale command was deprecated in docker compose v1 for some reason (people left docker, so I can't ask them) it was re-introduced in v2.22.0 release with a subtle difference with --scale flag:

  • docker compose scale SERVICE=scale will only manage target service, and won't run a full "convergence" logic. It will just create missing replicas (seems this is what you expect)
  • docker compose up --scale SERVICE=scale will run a full reconciliation (aka "convergence") for actual resources to match the compose.yaml model, with requested replicas.

ndeloof avatar Nov 29 '23 09:11 ndeloof