Uh oh!
There was an error while loading. Please reload this page.
fix(cli): exec remaining start wrappers so docker stop is not 10s (CLI-2192) - #6203
Conversation
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@aba42e87ae03d6887a4180a19fec965c1d10f3d0Preview package for commit |
2383507 to
6c58a71CompareUh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
6c58a71 to
4d6fac4Compare
This comment was marked as resolved.
This comment was marked as resolved.
4d6fac4 to
7e0315cCompare
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
7e0315c to
787493fCompare
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
27d1566 to
a39916fCompare
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
avallete
commented
Aug 24, 2026
@codex review |
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Postgres exec and postgres-meta v0.98.0 already landed with the shadow cache. Keep Kong, Vector, Edge Runtime, and a Logflare TERM-then-KILL supervisor so sh is no longer PID 1 on supabase stop. Vector's wait-loop now exits on TERM instead of burning the grace period while Logflare is still down.
BusyBox ash defers TERM until the foreground probe finishes. Cap each wget at 2s so a hung Logflare health endpoint cannot eat Docker's grace period. Drop leftover Go-parity comment framing.
Same fast-stop fix as the legacy wrappers: exec vector so it is PID 1 and docker stop reaches it directly instead of burning the 10s grace on the sh wrapper. No TERM trap needed here — the stack wrapper has no health wait-loop; readiness is handled via service dependencies. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
28c39f1 to
aba42e8CompareThere was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:aba42e87ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
supabase stop --no-backupwas gated by Docker's 10s SIGTERM grace: Kong, Vector, Edge Runtime, and Logflare keptshas PID 1 (or hung in their own shutdown), and stops run in parallel so wall time = slowest container.Postgres
execand postgres-meta v0.98.0 already landed on develop with #6184 / #6207. This PR is only the remaining wrappers, rebased onto that tip.What changed
execin every remaining CLI-authored wrapper so the real process is PID 1 (deliberate divergence from Go; stop timing is outside the parity surface, ADR 0016). Command paths, output, exit codes, telemetry, and documented side effects unchanged; no-t, nodocker rm -f, no grace-period env:start/functions servecontainer and the ephemeral script-runnersupabase stop --no-backupwall time@beta2.116.0-beta.6~2.5× faster (avg −7.5s / −59%). Start time is unchanged (same ~30–45s after images are warm).
Per-container
docker stop -t 10@beta@betash -c…docker-entrypoint.sh kong docker-startnginx: master processsh -c…vector --configvector --config /etc/vector/vector.yamlsh -c edge-runtime start …edge-runtime start …sh -c…sh run.shsh run.sh(TERM → 3s → KILL)postgres(already exec)postgres(unchanged)node dist/server/server.jsnode dist/server/server.jsStops run in parallel, so wall time ≈ slowest container + CLI prune (
container prune→ optional volume prune → network prune).@betais gated by the ~10.4s wrappers. This PR is gated by Logflare’s ~3s supervisor and Postgres shutdown (~4s on a full local db), which matches the ~5sstop --no-backuptimes.Options to gain more speed (defered)
Just levers. After this PR, wall time is ~
max(logflare ≈ 3s, postgres ≈ 4s)+ ~1s prune. Cutting only Logflare leaves Postgres as the gate (~4s + prune ≈ 5s, i.e. little visible win). Beating ~3s wall needs both plus less prune.Logflare (~3s supervisor)
Postgres (~4s smart shutdown)
pg_ctl stop -m fast/ SIGINT. Drops the wait-for-clients phase; still checkpoints. Helps most when Auth/REST/Realtime/Storage are still connected.-m immediate/ SIGQUIT. Skips checkpoint; nextstartcrash-recovers. Reasonable forstop --no-backup(volumes die anyway); bad if the volume is kept (stopwithout--no-backup).