Swarm seems to ignore stop-first

I have some drone CI/CD builders running.

I’d like to be able to do a rolling update, and I have sorta accomplished that by adding stop_grace_period:

So far so good - The droner runner container receives the shutdown signal, stops picking up new jobs and exits once its current are done. Meanwhile a new updated container becomes available and starts picking up new jobs.

However, while this works fine for most of our stuff, but a few instances we only want one running at a time.

I’ve tried adding this to my service:

deploy:
  replicas: 1
  placement:
    max_replicas_per_node: 1
  update_config:
    order: stop-first

However, docker swarm seems to ignore it.
I will still have two instances running on the same node during a rolling update. I get how max replicas per node might not do the job, but do I also misunderstand how stop-first works?

Stop-first is available for the compose file version 3.4 or later, and already is the default setting.
The placement constraint is not really meaningful with a single replica.

The placement constraint is not really meaningful with a single replica.

I kinda figured that, but it was an attempt at making it work.

Stop-first is available for the compose file version 3.4 or later, and already is the default setting.

Then why does it spin up another instance before old one is terminated?

Hello, recently I investigate topics around swarm managing tasks.
I ask related question in stack overflow: docker - Swarm task doesn't wait for container exit - Stack Overflow.

Can you rephrase it and explain what you want to achieve? I don’t understand how and why you change labels and it’s missing how you even run your containers.