Repository navigation
chore(supabase): bump pinned CLI to 2.122.0 - #544
9thLevelSoftware wants to merge 2 commits into
Conversation
Move .supabase-cli-version from 2.117.0 to 2.122.0 and regenerate database.types.ts with it (db reset --no-seed, then gen:types:local). The 2.122.0 type generator emits `ComputedFields: never` per table, `NonNullable<Json>` for NOT NULL json columns, and `never` for generated columns in Insert/Update. typecheck shows no new errors. `migration list --output-format json` keeps the same shape on 2.122.0, so scripts/migration-list-applied.mjs parses it unchanged (156 of 156 applied on a fresh local stack). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| # | ||
| # CLI pin change (NF-11): this workflow moved from a literal `2.76.9` to the | ||
| # repo-wide pin in `.supabase-cli-version` (currently 2.117.0). That swaps the | ||
| # repo-wide pin in `.supabase-cli-version` (currently 2.122.0). That swaps the |
There was a problem hiding this comment.
SUGGESTION: Header duplicates the pinned CLI version
.supabase-cli-version is already the single source for the CLI version, and the other three workflows that read it (migrations.yml, edge-integration.yml, prod-migration-drift.yml) say only "the repo-wide pin in .supabase-cli-version". This header is the single place that hardcodes the number, so every CLI bump has to hand-edit it — this PR is the proof — and a forgotten edit leaves a wrong version in the prod-deploy header. Drop the parenthetical version and keep the pointer to the file.
Optional cleanup; the current value is correct.
| @@ -1 +1 @@ | |||
| 2.117.0 | |||
| 2.122.0 | |||
There was a problem hiding this comment.
SUGGESTION: Two other places still describe 2.117.0 as the pinned CLI
tests/ci/migration-list-applied.test.ts:7 says the JSON fixtures were captured "on the pinned CLI (2.117.0)", which is false after this bump (2.117.0 is the previous pin), and docs/runbooks/operations.md:1672 records supabase secrets set --help as "verified against CLI 2.117.0". Reword the test comment to name 2.117.0 as the version the fixtures came from (or re-capture them on 2.122.0), and re-check the --env-file flag on the new CLI before the next shared-cron-secret rotation.
Non-blocking: the parser fails closed on a shape change, so the deploy gate is still safe.
| metric_key: string | null; | ||
| metric_type: string; | ||
| percentile_values: Json; | ||
| percentile_values: NonNullable<Json>; |
There was a problem hiding this comment.
SUGGESTION: NonNullable<Json> also removes the JSON value null
analytics_percentiles.percentile_values is JSONB NOT NULL DEFAULT '{}' (20260318150000), which rejects SQL NULL but still accepts the JSON value null ('null'::jsonb). The new NonNullable<Json> drops null from the union, so TS can no longer express that value and a row holding JSON null is typed as non-null. Same shape now applies to equipment_rack, led_preferences, vbt_preferences, workout_preferences, payload, row_snapshot, result and dismissed_hints.
No current impact — nothing writes JSON null to those columns — so this is optional. If it must stay representable, correct it in src/lib/database.ts, which is the file reserved for generator fixes, not in this generated one.
Code Review SummaryStatus: 4 Issues Found | Recommendation: Merge — all four findings are optional cleanup VerdictComment only — the new pgTAP arbiter fix is correct for the pinned CLI's storage shape and nothing in this PR blocks the merge; the four findings below are documentation/cleanup only. Overview
Issue Details (click to expand)SUGGESTION
Correctness / Safety FindingsNo correctness or safety findings. The new commit ( Assumption stated for the record: this sandbox has no network access, so the comment's upstream claims (storage-api migration Ponytail Reviewsupabase/tests/database/storage_avatars.test.sql:L29: shrink: seven-line rationale comment where three lines carry the same information. Keep the index name, the predicate and the 42P10 symptom; drop the migration number, the CLI/storage-api versions and the "older local shape" sentence. supabase/tests/database/storage_avatars.test.sql:L34: delete: "Supabase CLI 2.122.0 (storage-api v1.84.19)" duplicates the pin in .github/workflows/deploy-edge-functions.yml:L32: delete: "(currently 2.122.0)" duplicates the pin in Ponytail net: -4 lines. Suggested Minimal PatchOptional, four small edits, no new dependencies:
Final Merge GuidanceCan merge as-is; the four suggestions are optional cleanup. Two notes for the operator. The PR body still describes only the CLI bump and the type regeneration — it does not mention the pgTAP arbiter fix, and the DB suite now depends on the storage-api shape that ships with the pinned CLI. And this PR edits Files Reviewed (4 files)
Fix these issues in Kilo Cloud Previous Review Summary (commit 76a29b2)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 76a29b2)Status: 3 Issues Found | Recommendation: Merge — all three findings are optional cleanup VerdictComment only — the regenerated types match the migrated schema and the CLI pin stays wired through the single-source pin file, so nothing blocks the merge; the three findings below are documentation/cleanup only. Overview
Issue Details (click to expand)SUGGESTION
Correctness / Safety FindingsNo correctness or safety findings. Verified against the schema while reviewing: Note for the operator: this PR edits Ponytail Review.github/workflows/deploy-edge-functions.yml:L32: delete: "(currently 2.122.0)" duplicates the pin in Ponytail net: 0 lines. Suggested Minimal PatchOptional, three small edits, no new dependencies:
Final Merge GuidanceCan merge as-is; the three suggestions are optional cleanup. Files Reviewed (3 files)
Reviewed by minimax-m3 · Input: 70.5K · Output: 32.8K · Cached: 886.4K Review guidance: REVIEW.md from base branch |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
phoenix-portal | 87093c1 | Commit Preview URL Branch Preview URL |
Oct 27 2026, 03:11 PM |
storage-api 0072 drops storage.bucketid_objname, which the local stack gets with Supabase CLI 2.122.0 (storage-api v1.84.19) and prod already has. The avatar upserts used a bare ON CONFLICT (bucket_id, name), which then has no arbiter and fails with 42P10, failing the pgTAP suite in the Migrations workflow. Name the partial unique index's predicate so the upsert infers idx_objects_current_version on both old and new schemas. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -- storage-api migration 0072 (drop-bucketid-objname-index) removed the plain | ||
| -- bucketid_objname unique index, so a bare ON CONFLICT (bucket_id, name) has no | ||
| -- arbiter and fails with 42P10. Hosted projects already run that migration; | ||
| -- the local stack has it from Supabase CLI 2.122.0 (storage-api v1.84.19). The |
There was a problem hiding this comment.
SUGGESTION: Comment hardcodes the CLI version that .supabase-cli-version owns
Supabase CLI 2.122.0 here duplicates the version that .supabase-cli-version is the single source for, so this line needs a hand-edit on the next bump - the same duplication already flagged on .github/workflows/deploy-edge-functions.yml:32. The storage-api v1.84.19 version rots the same way.
Optional cleanup; the statement itself is correct. Point at the pinned CLI instead:
| -- the local stack has it from Supabase CLI 2.122.0 (storage-api v1.84.19). The | |
| -- the local stack has it from the storage-api that ships with the pinned CLI; the |
What
.supabase-cli-version: 2.117.0 → 2.122.0src/lib/database.types.ts: regenerated with 2.122.0 (db reset --no-seed, thengen:types:local)deploy-edge-functions.yml: header comment names the new pinGenerator output changes in 2.122.0
ComputedFields: never.json/jsonbcolumns becomeNonNullable<Json>.neverinInsert/Update.Checked locally
npm run typecheck: no new errors (app 21/21 known, test 139/139 known)npm test: 2486 passed, 16 skippednpm run check:edge-functions: cleanmigration list --output-format jsonon 2.122.0 has the same shape;scripts/migration-list-applied.mjsparses it (156/156 applied on a fresh stack)After merge
Per the
deploy-edge-functions.ymlheader, the first deploy on a new CLI is the first real run of its bundling and upload path. Watch that run and smoke-test one function afterwards.🤖 Generated with Claude Code