Skip to content
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

- character in project name breaks docker pull #2288

Open
eRuaro opened this issue May 15, 2024 · 10 comments
Open

- character in project name breaks docker pull #2288

eRuaro opened this issue May 15, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@eRuaro
Copy link

eRuaro commented May 15, 2024

Describe the bug
Supabase CLI keeps on pulling postgres version 15.1.0.73. even though I'm explicitly adding in version 15.1.1.4 on my .temp dir.

To Reproduce
I ran two experiments to reproduce this:
Here are my experiments. All involved removing the docker images before running supabase init.

First experiment:

$ supabase init
$ supabase start

This will pull the docker images and specifically will pull postgres with version 15.1.0.73.

Second experiment:

$ supabase init
// the command below will add version variables to the .temp directory for the supabase services. One of which will be version 15.1.1.44 for postgres
$ supabase link --project-ref my-supabase-cloud-proj --password my-db-password
$ supabase start

Both of these experiments still yielded in supabase CLI installing postgres with version 15.1.0.73.

Expected behavior
CLI will pull postgres with version 15.1.1.4

Additionally, running supabase services gives the following:

❯ npx supabase@beta services


        SERVICE IMAGE      │        LOCAL         │  LINKED
  ─────────────────────────┼──────────────────────┼────────────
    supabase/postgres      │ 15.1.1.44            │ 15.1.1.44
    supabase/gotrue        │ v2.151.0             │ v2.151.0
    postgrest/postgrest    │ v12.0.2              │ v12.0.2
    supabase/realtime      │ v2.28.32             │ -
    supabase/storage-api   │ v1.2.1               │ v1.2.1
    supabase/edge-runtime  │ v1.49.0              │ -
    supabase/studio        │ 20240506-2976cd6     │ -
    supabase/postgres-meta │ v0.80.0              │ -
    supabase/logflare      │ 1.4.0                │ -
    bitnami/pgbouncer      │ 1.20.1-debian-11-r39 │ -
    darthsim/imgproxy      │ v3.8.0               │ -

There's a mismatch on what's being outputted by the CLI, to the docker images being used.

Additional context
Having an outdated postgres version doesn't allow developers to have access to updated extensions. On my end, it means I don't have access to the updated versions of the vector extension. On postgres 15.1.0.73, I only have access to vector version 4 which does not have the HNSW index. This means I can't replicate my cloud setup anymore on my local environment.

@sweatybridge
Copy link
Contributor

Could it be that you have multiple installations of cli locally? Have you tried npx supabase start?

@eRuaro
Copy link
Author

eRuaro commented May 15, 2024

No, both experiments had me remove all the docker images prior to running npx supabase init.

@sweatybridge
Copy link
Contributor

What does npx supabase --version say? The only place we hardcode postgres version is in older version of cli.

Perhaps you can also try npx supabase@latest start

@eRuaro
Copy link
Author

eRuaro commented May 16, 2024

CLI is on: 1.167.4. The latest one

I deleted all my supabase related docker images again and ran npx supabase@latest start but it only downloaded postgres version 15.1.1.41 and not the other supabase services and errored out with database not healthy.

@sweatybridge
Copy link
Contributor

it only downloaded postgres version 15.1.1.41 and not the other supabase services and errored out with database not healthy

That looks like a new error similar to #2287

I'm unable to reproduce it on gitpod though. Could you show me the logs of database container? And may be remove any existing docker volumes with npx supabase@latest stop --no-backup

@eRuaro
Copy link
Author

eRuaro commented May 17, 2024

Nawp. Same issue, only getting postgres docker image. Even did docker system prune --all --force

@sweatybridge
Copy link
Contributor

sweatybridge commented May 17, 2024

Do you mean it's not even downloading other service images like auth and storage? Are there logs?

If it's a registry problem, you can try a different registry with SUPABASE_INTERNAL_IMAGE_REGISTRY=docker.io supabase start

@eRuaro
Copy link
Author

eRuaro commented May 17, 2024

Got it working now, it was a directory name issue. Thanks!

@sweatybridge
Copy link
Contributor

Good to hear. What was the problematic directory name? Perhaps I can update cli to handle it better.

@eRuaro
Copy link
Author

eRuaro commented May 18, 2024

It was an invalid project name for the docker images. So I had an invalid character, specifically I had -. I was able to run supabase on the project before though even when it had the - in the name. I just renamed it and removed the - character.

@sweatybridge sweatybridge changed the title Supabase CLI pulling outdated postgres version. - character in project name breaks docker pull May 19, 2024
@sweatybridge sweatybridge added the bug Something isn't working label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants