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.09k stars 212 forks source link

`supabase deploy` inconsistent state error #1934

Closed bombillazo closed 7 months ago

bombillazo commented 9 months ago

Describe the bug

Since v1.136.2 at least, running supabase functions deploy has been giving issues where the function seems to be deployed successfully but we always get a 500 response when we call the edge function. This deployment is happening from our GH actions workflow using the setup-cli action with the necessary permissions and project ID, which worked for previous CLI versions.

I'm not sure what the supabase/setup-cli is doing internally, it seems like it is running a docker container rather than the deploy command on the workflow runner host. When we call the edge function, we get 500 errors, with no logs generated in the dashboard, only the invocation error (see screenshot)

The current solution to this is that we have to manually deploy from our main branch locally into supabase with the same cli command.

To Reproduce

Steps to reproduce the behavior:

  1. Setup GH actions with supabase/setup-cli to run supabase function deploy
  2. Deploy a function with the supabase functions deploy
  3. Call the function endpoint.

Expected behavior

Independent of the environment, the deploy function successfully deploys and is available for use.

Screenshots

image

System information

Additional context

sweatybridge commented 7 months ago

Can't seem to reproduce. The next time it happens, could you file a support ticket attaching the erroneous eszip bundle downloaded from v1 api?

curl -H 'authorization: Bearer <access_token>' \
https://api.supabase.com/v1/projects/<ref>/functions/<slug>/body -o bin.eszip

Appreciate your help.