fix(deploy): use portable docker stop timeout flag
Some checks are pending
sf self-deploy / build, test, and publish server image (push) Waiting to run
sf self-deploy / deploy test and probe (push) Blocked by required conditions
sf self-deploy / promote prod (push) Blocked by required conditions

This commit is contained in:
Mikael Hugo 2026-05-17 23:00:56 +02:00
parent 8c945550fa
commit 6618d6594e
3 changed files with 3 additions and 3 deletions

View file

@ -81,7 +81,7 @@ web host, writes the release manifest, starts `sf-server-vega-candidate` on
port 4001, probes health/readiness/version/projects, replaces `sf-server-vega`
on port 4000 only after the candidate passes, probes prod, then removes the
candidate. Replacement drains the old container with
`docker stop --timeout ${SF_VEGA_DRAIN_STOP_TIME:-610}` before forced removal
`docker stop -t ${SF_VEGA_DRAIN_STOP_TIME:-610}` before forced removal
fallback. The default leaves a 10 second margin over the RPC child's
`SF_RPC_SHUTDOWN_GRACE_MS=600000` queue-drain handler.

View file

@ -208,7 +208,7 @@ function socketGroupId(path) {
function drainContainer(containerName) {
if (!containerExists(containerName)) return;
const stopTime = process.env.SF_VEGA_DRAIN_STOP_TIME || "610";
run("docker", ["stop", "--timeout", stopTime, containerName], {
run("docker", ["stop", "-t", stopTime, containerName], {
allowFailure: true,
});
run("docker", ["rm", "-f", containerName], { allowFailure: true });

View file

@ -201,7 +201,7 @@ function drainContainer(name) {
// lock contention so queued self-feedback writes are never lost
// across an upgrade. Override per-deployment via env if needed.
const stopTime = process.env.SF_VEGA_DRAIN_STOP_TIME || "610";
run("docker", ["stop", "--timeout", stopTime, name], { allowFailure: true });
run("docker", ["stop", "-t", stopTime, name], { allowFailure: true });
run("docker", ["rm", "-f", name], { allowFailure: true });
}