Repository navigation
fix: suggest recovery for Docker exec format errors - #5972
phuphung330 wants to merge 1 commit into
Conversation
|
👋 Thanks for the contribution! This pull request isn't linked to a tracked issue, so it's being closed automatically. Please open an issue first, wait for a maintainer to add the |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12d4ebab13
ℹ️ 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".
| var stdoutLogs, stderrLogs boundedLogBuffer | ||
| err := DockerRunOnceWithStream(ctx, job.Image, job.Env, job.Cmd, io.MultiWriter(stdout, &stdoutLogs), io.MultiWriter(stderr, &stderrLogs)) | ||
| if err != nil { | ||
| SuggestDockerExecFormat(stdoutLogs.String()+stderrLogs.String(), job.Image) |
There was a problem hiding this comment.
Use the resolved Docker image in the recovery hint
When no INTERNAL_IMAGE_REGISTRY override is set, DockerStart resolves job.Image to the actual cached/pulled image URL (defaulting to public.ecr.aws, then ghcr.io, then Docker Hub) before creating the container, but this hint passes the original job image. If a normal supabase start init job fails with exec format error, the user is told to remove supabase/..., which does not remove the corrupted public.ecr.aws/... or ghcr.io/... image that was actually started, so retrying can keep using the bad image and the suggested recovery does not work.
Useful? React with 👍 / 👎.
Summary
exec format erroroutput;Why
When an image entrypoint or shell cannot execute, Docker may report only
exec format errorfollowed by a generic exit code. The CLI can preserve that useful signal and point users to a narrow, non-automatic recovery path.Scope
Diagnostic UX only. This change does not assert the CLI corrupts images, does not remove images, and does not change Docker state.
Validation
Targeted Go 1.26 tests and formatting/diff checks pass. Full
./internal/utilsis not presented as green because existing mocked pull tests encountered registry-rate-limit failures in the test environment.