Skip to content

fix(cli): resume stack services after a failed db reset (CLI-3331) - #7916

Open
7ttp wants to merge 2 commits into
developfrom
7ttp/cli-3331-stack-a-failed-db-reset-leaves-the-api
Open

7ttp wants to merge 2 commits into
developfrom
7ttp/cli-3331-stack-a-failed-db-reset-leaves-the-api

Conversation

@7ttp

@7ttp 7ttp commented Dec 1, 2026

Copy link
Copy Markdown
Member

TL;DR

brings the stack's services back when supabase db reset fails on a migration, so the api is up again while the migration gets fixed

whats hurting the user?

with [experimental] stack = true, a migration error during db reset left only postgres running,
every api request went unanswered and supabase start exited 1 with The stack is in a partial lifecycle state
so the app had no api until the migration was fixed and reset again or the stack was stopped and started

fixed by:

once the database is back up, a failed or interrupted reset restarts the services it stopped and still exits with the migration error

a stack stopped from another terminal meanwhile stays stopped, and when the services cannot come back the reset warns with the supabase stack stop and supabase stack start steps to recover

ref:

@7ttp 7ttp self-assigned this Dec 1, 2026
@7ttp
7ttp requested a review from a team as a code owner December 1, 2026 23:11
@7ttp
7ttp requested a review from Coly010 December 1, 2026 23:11
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

CLI benchmark (Lightweight Commands): no changes found

Commit cd49efb against develop at bcc7363 · 10 runs each · report only, never blocks merging

Command Workload Before After Change
supabase --version version 222 ms 245 ms no real change (+11%, within normal variation)
supabase --help help 247 ms 244 ms no real change
supabase init init 248 ms 234 ms no real change (-6%, within normal variation)
supabase migration new bench migration-new 257 ms 246 ms no real change
supabase config convert config-convert 280 ms 288 ms no real change
supabase config validate config-validate 374 ms 364 ms no real change
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 338 ms 353 ms no real change
supabase projects list projects-list 309 ms 359 ms no real change (+16%, within normal variation)
supabase functions list --project-ref replayfixtureprojref functions-list 245 ms 240 ms no real change

API calls: unchanged for all 9 commands.

Binary size: 135.7 MB, unchanged.

Details: timing ranges, API calls per command, slowest phases

Timing ranges

Command Workload Before range After range Change Verdict
supabase --version version 201-328 ms 225-346 ms +23 ms (+11%) within noise
supabase --help help 228-286 ms 226-310 ms -3 ms (-1%) within noise
supabase init init 207-315 ms 208-283 ms -14 ms (-6%) within noise
supabase migration new bench migration-new 244-338 ms 224-315 ms -10 ms (-4%) within noise
supabase config convert config-convert 242-355 ms 244-339 ms +8 ms (+3%) within noise
supabase config validate config-validate 287-421 ms 290-460 ms -10 ms (-3%) within noise
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 299-441 ms 276-496 ms +15 ms (+4%) within noise
supabase projects list projects-list 282-394 ms 283-585 ms +51 ms (+16%) within noise
supabase functions list --project-ref replayfixtureprojref functions-list 219-281 ms 218-304 ms -5 ms (-2%) within noise

API calls per command

Command Workload Before After Endpoint changes
supabase --version version 0 0
supabase --help help 0 0
supabase init init 0 0
supabase migration new bench migration-new 0 0
supabase config convert config-convert 0 0
supabase config validate config-validate 0 0
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 2 2
supabase projects list projects-list 1 1
supabase functions list --project-ref replayfixtureprojref functions-list 2 2

Slowest phases

No command moved beyond noise, so there are no phase deltas.

Workflow run

Comment /bench to run the lightweight benchmark (this comment) again on the latest commit, or /bench full to also run the integration-heavy benchmark, which posts in its own comment.

github-actions[bot]

This comment was marked as resolved.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stack: a failed db reset leaves the API services stopped, and supabase start refuses to resume them

1 participant