Repository navigation
fix(postgrest): move override fixtures out of generated types, repair codegen - #2605
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PostgREST test types now define scalar computed-function fixtures for non-nullable numbers and Sequence Diagram(s)sequenceDiagram
participant CI
participant PackageScript
participant Generator
participant SupabaseCLI
CI->>PackageScript: Run codegen:check:postgrest
PackageScript->>Generator: Generate PostgREST types
Generator->>SupabaseCLI: Use absolute TEST_DIR for CLI workdir
SupabaseCLI-->>Generator: Generated types or error
Generator-->>PackageScript: Generation result
PackageScript->>PackageScript: Check generated-file drift
PackageScript-->>CI: Report success, drift, or generation failure
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@supabase/auth-js
@supabase/functions-js
@supabase/postgrest-js
@supabase/realtime-js
@supabase/storage-js
@supabase/supabase-js
commit: |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci-core.yml:
- Around line 472-473: Update the changed-files check in the workflow step
around the git diff pipeline to fail closed: remove the suppressed git diff
error, explicitly validate that origin/${BASE_REF} is fetched and that the base
comparison succeeds before matching paths, and make any fetch or diff failure
fail the job instead of setting changed=false and skipping
codegen:check:postgrest.
In `@packages/core/postgrest-js/test/embeded_functions_join.test.ts`:
- Line 1444: Remove the unassigned result declarations in the affected test
cases and replace them with type-only assertions that validate the inferred
query data type without creating runtime variables. Apply this to both
occurrences near the embeded functions join tests while preserving the existing
type expectation.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7f486a9b-0cac-4866-aa83-ec688d3b5711
⛔ Files ignored due to path filters (1)
packages/core/postgrest-js/test/types.generated.tsis excluded by!**/*.generated.*
📒 Files selected for processing (6)
.github/workflows/ci-core.ymlpackage.jsonpackages/core/postgrest-js/test/embeded_functions_join.test.tspackages/core/postgrest-js/test/rpc.test.tspackages/core/postgrest-js/test/types.override.tsscripts/generate-postgrest-types.js
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci-core.yml:
- Around line 471-475: Update the target-selection logic used by the
CHANGED_FILES diff in the reusable CI workflow so push-triggered runs compare
HEAD against github.event.before rather than github.ref_name/base_ref, which may
resolve to the current commit. Preserve the existing base-ref comparison for
pull requests and ensure the selected target is fetched before evaluating
origin/${BASE_REF}...HEAD.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 9ff1f43f-b751-4711-aee7-8edca7fe6245
📒 Files selected for processing (1)
.github/workflows/ci-core.yml
This PR updates `@supabase/supabase-js` to v2.112.4. **Source**: supabase-js-stable-release --- ## Release Notes ## v2.112.4 ## 2.112.4 (2026-08-24) ### 🩹 Fixes - **auth:** convert stolen-lock AbortError when acquireTimeout is 0 ([#2616](supabase/supabase-js#2616)) - **auth:** warn on deprecated lock option and prevent unhandled refresh rejection ([#2627](supabase/supabase-js#2627)) - **postgrest:** move override fixtures out of generated types, repair codegen ([#2605](supabase/supabase-js#2605)) - **realtime:** respect custom logger for send() REST fallback warning ([#2612](supabase/supabase-js#2612)) ### ❤️ Thank You - Katerina Skroumpelou @mandarini - mmustafasenoglu @mmustafasenoglu This PR was created automatically. Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
This PR updates @supabase/*-js libraries to version 2.112.4. **Source**: manual **Changes**: - Updated @supabase/supabase-js to 2.112.4 - Updated @supabase/auth-js to 2.112.4 - Updated @supabase/realtime-js to 2.112.4 - Updated @supabase/postgest-js to 2.112.4 - Refreshed pnpm-lock.yaml --- ## Release Notes ## v2.112.4 ## 2.112.4 (2026-08-24) ### 🩹 Fixes - **auth:** convert stolen-lock AbortError when acquireTimeout is 0 ([#2616](supabase/supabase-js#2616)) - **auth:** warn on deprecated lock option and prevent unhandled refresh rejection ([#2627](supabase/supabase-js#2627)) - **postgrest:** move override fixtures out of generated types, repair codegen ([#2605](supabase/supabase-js#2605)) - **realtime:** respect custom logger for send() REST fallback warning ([#2612](supabase/supabase-js#2612)) ### ❤️ Thank You - Katerina Skroumpelou @mandarini - mmustafasenoglu @mmustafasenoglu This PR was created automatically. Co-authored-by: mandarini <6603745+mandarini@users.noreply.github.com>
Moves the hand-written
scalar_computed_*fixtures out of the machine-generatedtypes.generated.tsintotypes.override.tsand regenerates the file, which also picks upecho_bigint_as_textandextract_jsonb_bigint_as_text(added to the test schema in #2245 but never regenerated). Repairscodegen:postgrest, which had been failing for everyone since pnpm 11 stopped rewriting the cwd to the nearest package directory: the relative--workdir testresolved totest/test, so every run died withchdir test: no such file or directory, locally and in CI alike.Re-enables the codegen sync check, which was gated on
packages/core/postgrest-js/test/db/, a path deleted when the tests moved to the Supabase CLI, so it never ran on any PR. It now watchestest/supabase/plus the rootpackage.json, since the pinned CLI version selects the postgres-meta image that performs the introspection. Also converts the two scalar computed field tests to type-only assertions (they were awaiting a request to a function that does not exist, then never asserting on the response) and drops the function-nameas anycasts inrpc.test.tsthat the regenerated types make unnecessary.Verified with two consecutive regens producing byte-identical output, so the
git diff --exit-codegate is stable rather than flaky, plus tstyche at 29/29 files and the postgrest-js integration suite at 350 passing tests.