functions deploy exits 0 without deploying under concurrent load (138 of 237 functions missing)

Open
#6,247 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
50/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
cli

Research direction

Start by reproducing supabase functions deploy <name> --project-ref <ref> for many functions with eight concurrent workers, then inspect the functions deploy command's result and exit-code handling. Compare reported success with GET /v1/projects/<ref>/functions/<slug> responses, including HTTP 429 and 404 cases; done means partial deployment is reported as failure rather than exiting 0.

Written by the indexing model from the issue text.

Description

🐛 Bug awaiting details supabase/cli

Running supabase functions deploy under concurrent load returns exit code 0 while the functions are not deployed.

What we measured

On a Supabase branch project, of 237 edge functions 138 were absent afterwards, while the CLI reported success for all 237 and exited 0. No warning and no rate-limit message appeared for those. The absence was confirmed along a second path: GET /v1/projects/<ref>/functions/<slug> returned HTTP 404 "Function not found" for each of them.

Some invocations did fail visibly with:

unexpected list functions status 429: {"message":"ThrottlerException: Too Many Requests"}

but far from all 138.

Why it matters

An automated bootstrap cannot trust the exit code. We now query the API after every round to learn what is actually deployed, and retry only the difference. Anyone who trusts the exit code ships half an environment and reports it as complete.

Question

Can the exit code follow the real result here, or is there a flag that makes the CLI fail on a partial deploy?

Environment
  • CLI version: 2.109.1
  • Target: Supabase branch project, 237 edge functions
  • Invocation: one supabase functions deploy <name> --project-ref <ref> per function, 8 in parallel
Dominant language
TypeScript
Stars
2.4k
Forks
523
Avg merge
20h 47m
Merged PRs (30d)
243

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/cli

All issues in supabase/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.