cli icon indicating copy to clipboard operation
cli copied to clipboard

`supabase link` not updating outdated `storage-api` service

Open boozedog opened this issue 1 year ago • 3 comments

Describe the bug I'm getting this warning

You are running outdated service versions locally: 
supabase/storage-api:v1.0.6 => v1.6.4
Run supabase link to update them.

But running supabase link does not update the outdated storage-api service

Screenshots after supabase link:

❯ supabase services

  
        SERVICE IMAGE      │      LOCAL       │  LINKED
  ─────────────────────────┼──────────────────┼────────────
    supabase/postgres      │ 15.1.1.25        │ 15.1.1.25
    supabase/gotrue        │ v2.152.1         │ v2.152.1
    postgrest/postgrest    │ v12.0.2          │ v12.0.2
    supabase/realtime      │ v2.28.32         │ -
    supabase/storage-api   │ v1.0.6           │ v1.6.4
    supabase/edge-runtime  │ v1.54.6          │ -
    supabase/studio        │ 20240422-5cf8f30 │ -
    supabase/postgres-meta │ v0.80.0          │ -
    supabase/logflare      │ 1.4.0            │ -
    supabase/supavisor     │ 1.1.56           │ -
    darthsim/imgproxy      │ v3.8.0           │ -

Run supabase link to sync your local image versions with the linked project.

System information

❯ cat /etc/lsb-release 
DISTRIB_CODENAME=vicuna
DISTRIB_DESCRIPTION="NixOS 24.11 (Vicuna)"
DISTRIB_ID=nixos
DISTRIB_RELEASE="24.11"
LSB_VERSION="24.11 (Vicuna)"

❯ node --version
v20.11.1

❯ supabase --version
1.178.2

❯ docker --version
Docker version 24.0.9, build v24.0.9

boozedog avatar Jun 28 '24 11:06 boozedog

I can't reproduce this locally. But as an alternative, you can manually update the storage version to match hosted.

echo "v1.6.4" > supabase/.temp/storage-version

sweatybridge avatar Jul 06 '24 16:07 sweatybridge

I can't reproduce this locally. But as an alternative, you can manually update the storage version to match hosted.

echo "v1.6.4" > supabase/.temp/storage-version

Thanks @sweatybridge I gave that a try (using v1.6.8) and I can see the correct value in supabase/.temp/storage-version but it didn't seem to have any effect:

❯ supabase start
You are running outdated service versions locally:
supabase/storage-api:v1.0.6 => v1.6.8
Run supabase link to update them.

boozedog avatar Jul 13 '24 19:07 boozedog

@sweatybridge FYI, I don't think supabase link has ever successfully updated the image versions for me. I just tried again now:

> supabase --version
1.204.3

> supabase services


        SERVICE IMAGE      │      LOCAL       │   LINKED
  ─────────────────────────┼──────────────────┼─────────────
    supabase/postgres      │ 14.1.0.89        │ 15.6.1.132
    supabase/gotrue        │ v2.158.1         │ v2.163.0
    postgrest/postgrest    │ v12.2.0          │ v12.2.3
    supabase/realtime      │ v2.30.34         │ -
    supabase/storage-api   │ v1.11.13         │ v1.11.14
    supabase/edge-runtime  │ v1.58.12         │ -
    supabase/studio        │ 20240930-16f2b8e │ -
    supabase/postgres-meta │ v0.83.2          │ -
    supabase/logflare      │ 1.4.0            │ -
    supabase/supavisor     │ 1.1.56           │ -

Run supabase link to sync your local image versions with the linked project.

> supabase link --project-ref «PROJECT REF»
Enter your database password (or leave blank to skip):
Finished supabase link.

> supabase services


        SERVICE IMAGE      │      LOCAL       │   LINKED
  ─────────────────────────┼──────────────────┼─────────────
    supabase/postgres      │ 14.1.0.89        │ 15.6.1.132
    supabase/gotrue        │ v2.158.1         │ v2.163.0
    postgrest/postgrest    │ v12.2.0          │ v12.2.3
    supabase/realtime      │ v2.30.34         │ -
    supabase/storage-api   │ v1.11.13         │ v1.11.14
    supabase/edge-runtime  │ v1.58.12         │ -
    supabase/studio        │ 20240930-16f2b8e │ -
    supabase/postgres-meta │ v0.83.2          │ -
    supabase/logflare      │ 1.4.0            │ -
    supabase/supavisor     │ 1.1.56           │ -

Run supabase link to sync your local image versions with the linked project.

haydn avatar Oct 19 '24 06:10 haydn

I'm having the same problems. npx supabase link finishes with no warnings, then npx supabase start warns about

WARNING: You are running different service versions locally than your linked project:
supabase/storage-api:v1.22.6 => v1.22.4
Run supabase link to update them.

Any updates on this? @sweatybridge suggestion did not worked for me, the .temp/storage-version is always overwritten with custom-metadata no matter what value I put in there

   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.47               | -
   supabase/storage-api   | v1.22.6                | v1.22.4
   supabase/edge-runtime  | v1.67.4                | -
   supabase/studio        | 2025.04.21-sha-173cc56 | -
   supabase/postgres-meta | v0.88.9                | -
   supabase/logflare      | 1.12.0                 | -
   supabase/supavisor     | 2.5.1                  | -

pewinski avatar Apr 25 '25 16:04 pewinski

Hi @pewinski, we changed the way storage migrations are pinned, so your storage-api image version will always be upgraded together with cli version. I will make sure the warning message is no longer shown.

sweatybridge avatar Apr 25 '25 17:04 sweatybridge

I have the same error and terminal output as @pewinski . A bit weird that the linked version is a lower version compared to the local installed one right?

I never understood what the "link" command has to do with upgrades of the local supabase services.

logemann avatar Apr 28 '25 15:04 logemann

I never understood what the "link" command has to do with upgrades of the local supabase services.

The purpose of link command is to configure your local environment the same way as your remote project. Running different versions could result in undefined behaviour when diff migrations, generating types, etc. That's the primary reason we check that when running supabase link.

A bit weird that the linked version is a lower version compared to the local installed one right?

Yes, the reason is we do staged rollouts for platform services so some projects will not immediately upgraded to the latest version. On the other hand, local is always updated to track the latest so sometimes it can be ahead.

sweatybridge avatar Apr 29 '25 03:04 sweatybridge