cli
cli copied to clipboard
Inconsistent Typescript types in CI when using tpes generation
Describe the bug I want to verify my generated Typescript types in my CI as proposed here. However I'm facing the problem that the types generated in the CI environment differ from the ones generated locally.
To Reproduce Steps to reproduce the behavior:
- Run
supabase gen types typescript --local > ./lib/database.types.tslocally and check in the result. - Run
supabase gen types typescript --local > ./lib/database.types.tsin CI. - Use git to diff the file. This results in:
diff --git a/packages/supabase/src/database.types.ts b/packages/supabase/src/database.types.ts
index 8465ced..0de863f 100644
--- a/packages/supabase/src/database.types.ts
+++ b/packages/supabase/src/database.types.ts
@@ -791,6 +791,10 @@ export type Database = {
}
Returns: boolean
}
+ install_extensions: {
+ Args: Record<PropertyKey, never>
+ Returns: undefined
+ }
is_account_owner: {
Args: {
account_id: string
Expected behavior No diff.
System information
Rerun the failing command with --create-ticket flag.
- Version of CLI: v1.63.2 (same version locally and in CI)
- Versions of services: (same locally and in CI)
SERVICE IMAGE │ LOCAL │ LINKED
─────────────────────────┼──────────────────────┼────────────
supabase/postgres │ 15.1.1.41 │ 15.1.1.41
supabase/gotrue │ v2.148.0 │ v2.148.0
postgrest/postgrest │ v12.0.2 │ v12.0.2
supabase/realtime │ v2.28.23 │ -
supabase/storage-api │ v1.0.10 │ v1.0.10
supabase/edge-runtime │ v1.45.2 │ -
supabase/studio │ 20240422-5cf8f30 │ -
supabase/postgres-meta │ v0.80.0 │ -
supabase/logflare │ 1.4.0 │ -
bitnami/pgbouncer │ 1.20.1-debian-11-r39 │ -
darthsim/imgproxy │ v3.8.0 │ -
Hi @sweatybridge, is there any plan to try to fix this issue?
Hi, I suspect the service version is different on CI. Could you try running supabase link on CI as well?
- run: supabase link --project-ref $SUPABASE_PROJECT_ID
- run: supabase gen types ...
Hi @Panzki, were you able to figure it out?