supabase / cli

Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema.
https://supabase.com/docs/reference/cli/about
MIT License
1.07k stars 209 forks source link

Ability to choose image versions #2391

Closed haydn closed 5 months ago

haydn commented 5 months ago

Is your feature request related to a problem? Please describe.

More than once changes have been rolled out to the Supabase platform that have caused something in our app to break (e.g. https://github.com/supabase/auth/issues/1579), but breakages cannot be reproduced locally because the CLI is using an older version of gotrue/storage/supavisor etc.

Describe the solution you'd like

It'd be great to add option(s) to the start command to specific exactly which images to use. Something like this maybe:

supabase start --images=gotrue:supabase/gotrue:v2.151.0,supavisor:supabase/supavisor:1.1.56

Alternatively, an option to grab the latest versions would be pretty good:

supabase start --use-latest-images

Describe alternatives you've considered

I guess I could build a version of the CLI locally and set the versions I want myself? Not a trivial exercise.

The normal workaround I use when I hit this it to connect directly to a hosted Supabase instance. It's not ideal though.

Additional context

Here's a related request from a few year ago 😂: https://github.com/supabase/cli/issues/324

sweatybridge commented 5 months ago

You can run supabase link to sync up image versions between local and hosted project.

The version file is written to supabase/.temp/gotrue-version so you can also edit it manually to test a specific version.

sweatybridge commented 5 months ago

related to https://github.com/supabase/cli/issues/1702

haydn commented 5 months ago

@sweatybridge I found some time over the weekend to have a play with supabase link. That solves my main problem. Thanks! :+1: