Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21e069dd08
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@21e069dd0865ac6d270d2e416db958b5314b72f1Preview package for commit |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
## TL;DR fixes `supabase start` and `functions serve` dying since 2.116.0 with ``` failed to copy edge runtime main service into container: destination "supabase_edge_runtime_<id>:/" must be a directory ``` on projects whose functions import local workspace packages through import map directory mappings - the trigger is supabase#6273 moving the bootstrap onto docker create + cp + start: the daemon refuses to resolve the copy target when a file bind is nested inside a read only parent bind - the overlapping binds themselves are much older, the import walker adds a file bind per imported module while import map target enumeration adds the package directory that already contains them, harmless until a cp step landed between create and start so now the mount list is pruned before `docker create`, a bind is dropped only when another bind of the same mode already supplies the same content at the same container path, so the container sees the same files at the same paths and the cp delivery from supabase#6273 stays intact... ## ref: - closes: supabase/supabase#50088 - extends: supabase#6273 --------- Co-authored-by: Colum Ferry <[email protected]>
…upabase#7607) ## TL;DR fixes `supabase start` and `functions serve` failing on every restart on Docker Desktop when `supabase/functions/.env` holds a multiline value ## what's missing? a multiline value such as a quoted PEM key was staged under `supabase/.temp/start-secrets` and bind mounted into the edge runtime. `stop` deletes that folder and the next `start` recreates it, and Docker Desktop then fails the `docker cp` of the main service with `must be a directory`, so only the first start in a project ever worked ## now fixed by: the multiline env script and its values now ride in the same `docker cp` archive as the main service, so the edge runtime no longer needs that host folder. a `multiline-env` folder left by an older CLI is removed on the next start <details> <summary>visual rep</summary> ```mermaid flowchart TD A["supabase/functions/.env has a multiline value<br/>supabase start, stop, start again on Docker Desktop"] A -->|before| B["value staged in .temp/start-secrets/…/multiline-env<br/>and bind mounted into the edge runtime"] B --> C["stop deletes that folder, start recreates it"] C -.-> D["docker cp fails with must be a directory<br/>first start works, every restart fails"] A -->|now| E["script and values ride in the docker cp archive<br/>next to the main service, no host bind"] E --> F["every restart and functions serve start<br/>value arrives byte for byte"] classDef t fill:transparent class A,B,C,D,E,F t ``` </details> ## ref: - closes: supabase#7603 - missed in: supabase#6273
TL;DR
fixes
supabase startandfunctions servedying with edge-runtime's "failed to determine entrypoint" on Docker daemons that cannot see the client's filesystem (remote tcpDOCKER_HOSTcontexts, podman machines)index.tsout of thesh -cargv onto a single file host bind mount to fix theWindows ENAMETOOLONGcrashstartreuse that serve core which left the bind sourcing a host path such daemons silently materialize as an empty directory at/root/index.tsso now the bundled template is streamed into the created container with
docker cpbeforedocker start,the same delivery Kong, Postgres, and Supavisor secret files already use since:
which fixes bring-up on non local daemons while the earlier
ENAMETOOLONGfix stays intact since nothing returns to the
spawn argvand the template no longer stages on host disk at all....ref: