fix: ai-gateway exits 127 in all-in-one image (#5657)#5661
Open
ashishkr96 wants to merge 1 commit into
Open
Conversation
The all-in-one supervisord program for ai-gateway was running `yarn start` in `/app/gateway`, but ai-gateway is a Rust binary and `/app/gateway` is not present in the current Dockerfile, so supervisord failed with exit status 127 in a tight retry loop until it gave up (FATAL). Pull `/usr/local/bin/ai-gateway` from the published `helicone/ai-gateway` image and invoke it directly from supervisord. Also expose 8788 to match the program's PORT env. Fixes Helicone#5657 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
@ashishkr96 is attempting to deploy a commit to the Helicone Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #5657 —
docker run helicone/helicone-all-in-one:latestfails because theai-gatewaysupervisord program loops with exit status 127 until it hits FATAL.Root cause
supervisord.confruns the gateway with:This was added in d8bf4ca, but it has two problems:
ai-gatewayis a Rust binary, not a Node project —yarn startwas never the right entry point.COPY --from=helicone/ai-gateway:latest /app /app/gateway, the secondCOPY supervisord.conf, themonitor_logs.sh/debug_jawn.sh/health_check.shcopies, and the8788inEXPOSE) are no longer inDockerfile, so/app/gatewaydoesn't exist in the published image at all.Result: supervisord tries
cd /app/gateway && yarn start, the directory doesn't exist, the process exits with 127, supervisord retries, gives up:gave up: ai-gateway entered FATAL state, too many start retries too quickly. The other commenter's "wait for DB" theory doesn't fit — the gateway exits in <1 s before any DB connect would be attempted, and a Rust DB connect failure wouldn't surface as 127.Fix
ai-gatewaybinary (/usr/local/bin/ai-gatewayper the upstreamHelicone/ai-gatewayDockerfile) into the all-in-one image.yarn startand the missingdirectory.8788toEXPOSEto document the gateway port.Test plan
docker buildx build -t helicone-all-in-one:test .succeedsdocker run --rm -p 3000:3000 -p 8585:8585 -p 9080:9080 helicone-all-in-one:test—ai-gatewayno longer enters FATAL;docker exec <id> supervisorctl status ai-gatewayshowsRUNNINGcurl http://localhost:8788from inside the container responds (port not forwarded by default; usedocker exec)