Skip to content

Docker Executor: use Stop for graceful shutdown

What does this MR do?

Replaces !2132 (closed), rebased on main.

Why was this MR needed?

Deploying infra as code (Terraform, Pulumi, et al.) and not using a graceful shutdown is asking for state file corruption.

What's the best way to test this MR?

Honestly, I just want someone qualified to review this and help fix the tests. I'm not a Go expert or familiar with this codebase. My read of the ContainerStop API is that it synchronously makes the POST to /stop the container, but it does not wait for the container to complete.

The wait.go API appears to wait for the container to close via ContainerWait, which means the only change needed is calling ContainerStop instead of ContainerKill.

What are the relevant issue numbers?

#6359 (closed) !2132 (closed)

Edited by Aaron Friel

Merge request reports