Skip to content

Type Generation not consistent on platforms #929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bombillazo opened this issue Apr 9, 2025 · 2 comments · Fixed by #930
Closed

Type Generation not consistent on platforms #929

bombillazo opened this issue Apr 9, 2025 · 2 comments · Fixed by #930

Comments

@bombillazo
Copy link

Describe the bug

While developing, we run supabase gen types locally on our MacBook Pros. Then, we do type checking in a Unix Ubuntu GitHub action that runs the same type generation command to ensure no disparity between the types. For some reason we are getting differences, particularly in the order of specific parameters in functions (see diff below).

To Reproduce
Steps to reproduce the behavior:

  1. Run supabase gen types --local --schema from my mac
  2. Run the same command from a Ubutun GH actions runer

Expected behavior

Both types generated are the same.

Screenshots

@@ -992,8 +992,8 @@ export type SupabaseDB = {
       };
       schedule: {
         Args:
-          | { schedule: string; command: string }
-          | { job_name: string; schedule: string; command: string };
+          | { job_name: string; schedule: string; command: string }
+          | { schedule: string; command: string };
         Returns: number;
       };
       schedule_in_database: {
@@ -1622,8 +1622,8 @@ export type SupabaseDB = {
       };
       crypto_auth: {
         Args:
-          | { message: string; key: string }
           | { message: string; key_id: number; context?: string }
+          | { message: string; key: string }
           | { message: string; key_uuid: string };
         Returns: string;
       };
@@ -1647,8 +1647,8 @@ export type SupabaseDB = {
       };
       crypto_auth_hmacsha512: {
         Args:
-          | { message: string; secret: string }
           | { message: string; key_id: number; context?: string }
+          | { message: string; secret: string }
           | { message: string; key_uuid: string };
         Returns: string;
       };
@@ -1819,8 +1819,8 @@ export type SupabaseDB = {
       };
       crypto_shorthash: {
         Args:
-          | { message: string; key: string }
           | { message: string; key: number; context?: string }
+          | { message: string; key: string }
           | { message: string; key_uuid: string };
         Returns: string;
       };

System information

  • Version of OS: Ubuntu 24.04, MacOS 15.4
  • Version of CLI: 2.20.12
  • Versions of services:
SERVICE IMAGE LOCAL LINKED
supabase/postgres 15.8.1.054 15.8.1.054
supabase/gotrue v2.170.0 v2.170.0
postgrest/postgrest v12.2.3 v12.2.3
supabase/realtime v2.34.45 -
supabase/storage-api v1.19.3 -
supabase/edge-runtime v1.67.4 -
supabase/studio 20250317-6955350 -
supabase/postgres-meta v0.88.2 -
supabase/logflare 1.12.0 -
supabase/supavisor 2.4.14 -
@avallete
Copy link
Member

avallete commented Apr 9, 2025

Hey there ! Thank's for reporting !

Seems like an issue with postgres-meta and the sorting of the args in a more deterministic way. Transfering the issue to the right repo.

@bombillazo
Copy link
Author

Thanks!!!

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 a pull request may close this issue.

2 participants