Skip to content

fix(cli): keep other Postgres overrides when config push changes db.settings - #7951

Open
jgoux wants to merge 1 commit into
developfrom
fix/config-push-db-settings-patch
Open

jgoux wants to merge 1 commit into
developfrom
fix/config-push-db-settings-patch

Conversation

@jgoux

ghost commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

config push sent only the changed db.settings keys with a PUT, which replaces the project's whole set of Postgres config overrides. Changing one setting removed every other stored override, including ones declared in the config file that had not changed.

Push now sends the same body with PATCH, which merges it into the stored overrides. The command's declared permission changes from v1-update-postgres-config to v1-patch-postgres-config to match.

…ettings

config push sent only the changed db.settings keys with a PUT, which replaces the
project's whole set of Postgres config overrides. Push now sends the same body with
PATCH, which merges it into the stored overrides.
@jgoux
jgoux requested a review from a team as a code owner December 3, 2026 21:43
@jgoux
jgoux requested a review from Prashansa-K December 3, 2026 21:43
@jgoux jgoux self-assigned this Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

CLI benchmark (Lightweight Commands): no changes found

Commit 740393c against develop at 8329f43 · 10 runs each · report only, never blocks merging

Command Workload Before After Change
supabase --version version 210 ms 216 ms no real change
supabase --help help 203 ms 202 ms no real change
supabase init init 212 ms 216 ms no real change
supabase migration new bench migration-new 258 ms 255 ms no real change
supabase config convert config-convert 240 ms 225 ms no real change (-6%, within normal variation)
supabase config validate config-validate 268 ms 248 ms no real change (-8%, within normal variation)
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 229 ms 254 ms no real change (+11%, within normal variation)
supabase projects list projects-list 200 ms 200 ms no real change
supabase functions list --project-ref replayfixtureprojref functions-list 183 ms 187 ms no real change

API calls: unchanged for all 9 commands.

Binary size: 134.1 MB, unchanged.

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

Timing ranges

Command Workload Before range After range Change Verdict
supabase --version version 176-242 ms 181-255 ms +5 ms (+3%) within noise
supabase --help help 164-247 ms 187-274 ms -1 ms (-1%) within noise
supabase init init 183-301 ms 170-240 ms +4 ms (+2%) within noise
supabase migration new bench migration-new 210-325 ms 214-332 ms -4 ms (-1%) within noise
supabase config convert config-convert 213-329 ms 203-387 ms -15 ms (-6%) within noise
supabase config validate config-validate 190-328 ms 202-334 ms -21 ms (-8%) within noise
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 200-265 ms 197-342 ms +25 ms (+11%) within noise
supabase projects list projects-list 172-322 ms 183-346 ms 0 ms (0%) within noise
supabase functions list --project-ref replayfixtureprojref functions-list 164-227 ms 167-216 ms +4 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 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: snapshot supabase/supabase@b0254cf supplied to reviewers (advisory, not a style pass).

The PR switches config push to PATCH for db.settings and updates the permission declaration to match. One minor finding is confirmed: the integration test's name overstates what it verifies about remote overrides. The diff changes no CLI reference prose.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/commands/config/push/push.integration.test.ts:1245 test-coverage codex The test name claims that other remote overrides are preserved. Its assertions cover the outgoing PATCH request and permission declaration.

Stats

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


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.

});

it.effect("sends only the one differing db.settings key", () => {
it.effect("patches the one differing db.settings key and leaves other overrides alone", () => {

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.

🟡 MINOR · test-coverage · source: codex

The test name claims that other remote overrides are preserved. Its assertions cover the outgoing PATCH request and permission declaration.

Evidence: apps/cli/src/commands/config/push/push.integration.test.ts:1245 says the push “leaves other overrides alone.” Lines 1273–1277 assert one PATCH with { statement_timeout: "8s" } and check permission drift. The mock at lines 352–357 returns a canned 200 {} without updating stored settings.

Suggested fix: Rename the test to “sends a PATCH with only the changed db.settings key.”

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.

1 participant