Skip to content

Conversation

avallete
Copy link
Member

@avallete avallete commented Aug 5, 2025

What kind of change does this PR introduce?

  • Add all the necessary informations for embeded functions type inferences to work in postgrest-js (see: feat(types): add embeded functions type inference postgrest-js#632 )

  • Canary tested that it's mostly retro-compatible by generating the types on the infrastructure codebase. The new type definition didn't raised much type errors but we don't use a lot of functions/rpc calls in it. So there is still a chance for this to break some codebases. Best approach might be to release this one as an -rc release so it can be opt-in via local cli echo "vXX-rc" > supabase/.temp/postgres-meta-version && supabase gen types

That way with a canary release of the postgrest-js and the supabase-js we might release gradually with a way for people to opt-out if it causes issue.

I'm open to suggestion about how to release this !

Closes: PGMETA-61

- Introspect the setof function fields for functions
- Restore functions as unions of args + returns
@avallete avallete force-pushed the feat/add-functions-setof-type-introspection-v2 branch from 317219e to 64a1afc Compare August 5, 2025 15:39
@coveralls
Copy link

coveralls commented Aug 6, 2025

Pull Request Test Coverage Report for Build 18323717185

Details

  • 239 of 240 (99.58%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.6%) to 82.952%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/server/templates/typescript.ts 236 237 99.58%
Totals Coverage Status
Change from base Build 18155965224: 0.6%
Covered Lines: 5919
Relevant Lines: 6995

💛 - Coveralls

@avallete avallete marked this pull request as ready for review August 6, 2025 17:27
@avallete avallete requested review from a team as code owners August 6, 2025 17:27
@avallete avallete requested a review from soedirgo August 7, 2025 08:18
Copy link

github-actions bot commented Sep 16, 2025

🚀 Canary Deployment Status

Canary image deployed successfully!

🐳 Docker Image: supabase/postgres-meta:canary-pr-971-8b65b3904cbc41cd26ea88876ff77d239c70219e
📝 Commit: 8b65b3904cbc41cd26ea88876ff77d239c70219e

You can test this canary deployment by pulling the image:

docker pull supabase/postgres-meta:canary-pr-971-8b65b3904cbc41cd26ea88876ff77d239c70219e

You can also set the version in a supabase local project by running:

echo "supabase/postgres-meta:canary-pr-971-8b65b3904cbc41cd26ea88876ff77d239c70219e" > supabase/.temp/pgmeta-version

Or use it in your docker-compose.yml:

services:
  postgres-meta:
    image: supabase/postgres-meta:canary-pr-971-8b65b3904cbc41cd26ea88876ff77d239c70219e
    # ... other configuration

The canary image is available on:

false


Last updated: 2025-10-07T19:34:35Z

@avallete avallete added the deploy-canary Deploy a canary image for postgres-meta label Sep 16, 2025
@soedirgo
Copy link
Member

Can we split out the refactor into another PR? It's difficult to see which change is related to computed relationships.

@avallete avallete changed the base branch from master to chore/isolate-function-type-generation September 24, 2025 15:15
@avallete avallete added deploy-canary Deploy a canary image for postgres-meta and removed deploy-canary Deploy a canary image for postgres-meta labels Sep 27, 2025
@avallete avallete changed the base branch from chore/isolate-function-type-generation to master September 27, 2025 10:05
@avallete avallete added deploy-canary Deploy a canary image for postgres-meta and removed deploy-canary Deploy a canary image for postgres-meta labels Sep 27, 2025
@avallete avallete removed the deploy-canary Deploy a canary image for postgres-meta label Sep 27, 2025
@avallete avallete added the deploy-canary Deploy a canary image for postgres-meta label Sep 29, 2025
@avallete avallete requested a review from soedirgo October 1, 2025 09:39
* fix(typescript): unknown is already nullable

Fixes: supabase/cli#4234
supabase/cli#577

* fix: also exclude any from null union
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-canary Deploy a canary image for postgres-meta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants