Skip to content

test(cli): stop waiting for a database restart in the ssl-enforcement live test - #7710

Merged
mdonnalley merged 2 commits into
developfrom
test/ssl-enforcement-live-drop-restart-check
Nov 19, 2026
Merged

mdonnalley merged 2 commits into
developfrom
test/ssl-enforcement-live-drop-restart-check

Conversation

@Prashansa-K

Copy link
Copy Markdown
Contributor

Summary

The ssl-enforcement update live test has failed on every live e2e run since 2026-11-18, on develop, main and next alike, with:

database reboot after ssl-enforcement update: the postmaster started at … is still running

#7016 made the test wait for a new postmaster after each toggle, because an SSL enforcement change used to restart the database after ssl-enforcement get had already reported it applied, and that late restart killed the next live file's migration up with 57P01. The platform now applies the change without a restart: the same main commit passed and then failed a day later, and the failing runs show no restart afterwards either. So the wait never ends.

This drops the postmaster-start check. The test still proves the toggle through ssl-enforcement get, restores the captured posture, and reports toggle and restore failures together. queryLiveDb's handling of a dropped idle client from #7016 stays, since other live tests use it.

If the platform goes back to restarting on this change, the original leak would show up again as 57P01 in the next file's migration up.

🤖 Generated with Claude Code

… live test

The platform now applies an SSL enforcement change without restarting
Postgres, so polling pg_postmaster_start_time for a new postmaster never
succeeds. The test keeps proving the change through `ssl-enforcement get`
and restoring the captured posture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Prashansa-K
Prashansa-K requested a review from a team as a code owner November 19, 2026 08:31
@github-actions

Copy link
Copy Markdown
Contributor

CLI benchmark (Lightweight Commands): no changes found

Commit 7d903d2 against develop at c810cdc · 10 runs each · report only, never blocks merging

Command Workload Before After Change
supabase --version version 174 ms 177 ms no real change
supabase --help help 181 ms 183 ms no real change
supabase init init 175 ms 188 ms no real change (+8%, within normal variation)
supabase migration new bench migration-new 175 ms 184 ms no real change (+5%, within normal variation)
supabase config convert config-convert 197 ms 198 ms no real change
supabase config validate config-validate 191 ms 186 ms no real change
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 195 ms 207 ms no real change (+6%, within normal variation)
supabase projects list projects-list 193 ms 217 ms no real change (+13%, within normal variation)
supabase functions list --project-ref replayfixtureprojref functions-list 197 ms 196 ms no real change

API calls: unchanged for all 9 commands.

Binary size: 135.2 MB, unchanged.

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

Timing ranges

Command Workload Before range After range Change Verdict
supabase --version version 153-192 ms 164-202 ms +3 ms (+2%) within noise
supabase --help help 171-195 ms 162-192 ms +1 ms (+1%) within noise
supabase init init 164-212 ms 166-207 ms +13 ms (+8%) within noise
supabase migration new bench migration-new 164-190 ms 161-200 ms +10 ms (+5%) within noise
supabase config convert config-convert 183-223 ms 194-243 ms +1 ms (+1%) within noise
supabase config validate config-validate 175-247 ms 173-217 ms -5 ms (-2%) within noise
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 188-227 ms 194-260 ms +12 ms (+6%) within noise
supabase projects list projects-list 178-241 ms 186-239 ms +24 ms (+13%) within noise
supabase functions list --project-ref replayfixtureprojref functions-list 177-219 ms 179-275 ms -1 ms (-1%) 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 github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

CLI reference prose guidance: not applicable (no reference sources changed).

The SSL-enforcement live test now relies on Management API status to verify the toggle and restore. One minor finding remains uncertain because the checked-out code does not establish whether the current platform can report success before Postgres is ready. CLI reference prose review was inapplicable to this test-only change.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/commands/ssl-enforcement/update/update.live.test.ts:154 test-coverage codex The live test can start restoring the original SSL posture while the toggle is still being applied, then report success while the shared database is still restarting.

Stats

Claude findings: 0 · Codex findings: 1 · Confirmed: 0 · Refuted: 0 · Uncertain: 1


Models: claude-opus-5-5 + gpt-6.2-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

… change

`ssl-enforcement get` can report the posture applied while Postgres is
still restarting. After the toggle and the restore, the test now polls
`select 1` until the database answers, whether or not the change
restarted the postmaster.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Prashansa-K

Prashansa-K commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Live e2e run passed with the fix: https://github.com/supabase/cli/actions/runs/44490049359

@mdonnalley
mdonnalley added this pull request to the merge queue Nov 19, 2026
Merged via the queue into develop with commit 8766994 Nov 19, 2026
55 checks passed
@mdonnalley
mdonnalley deleted the test/ssl-enforcement-live-drop-restart-check branch November 19, 2026 21:08
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.

2 participants