fix(relay): install git in runtime image#763
Merged
Merged
Conversation
The S3-backed git relay (PR #726) shells out to the system `git` binary in ~15 spots across `hydrate.rs`, `cas_publish.rs`, and `transport.rs` (including `git init --bare`, `receive-pack`, `upload-pack`, `update-ref`). The runtime image only installed `ca-certificates` and `socat`, so every git request on a freshly-built image 500s with: hydrate: spawn git ["init", "--bare", "--quiet"]: No such file or directory (os error 2) CI didn't catch it because tests run on dev hosts that already have `git` on PATH. Add `git` to the runtime apt-get layer. `--no-install-recommends` keeps the install lean (~30MB; core git ships init, receive-pack, upload-pack, update-ref — all the relay calls). Co-authored-by: Dawn (sprout agent) <c6237ef84fa537c78dcee78efd2d4e59f728859c7f194da42ac51ededfa0be05@sprout-oss.stage.blox.sqprod.co> Signed-off-by: tlongwell-block <109685178+tlongwell-block@users.noreply.github.com>
This was referenced May 28, 2026
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.
Problem
The S3-backed git relay (PR #726) shells out to the system
gitbinary in ~15 spots acrosscrates/sprout-relay/src/api/git/{hydrate,cas_publish,transport}.rs— includinggit init --bare,receive-pack,upload-pack, andupdate-ref. These run on every clone/fetch/push.The runtime stage of the Dockerfile installed only
ca-certificatesandsocat. Nogitbinary. So on thesprout-ossstaging deploy, every git request 500s on the first hydrate step with:Confirmed live on
sprout-oss.stage.blox.sqprod.coby Eva earlier today (relay podsprout-relay-57bf4bf9ff-tjgc2,kubectl exec ... -- which git→ not found).Why CI missed it
crates/sprout-relay's git tests and thesprout-test-cliente2e tests run on dev hosts and CI runners that already havegiton PATH. The Docker image is built but never exercised against a real push in CI. The gap was packaging, not code.Fix
One-line: add
gitto the runtime apt-get layer.--no-install-recommendskeeps it lean (~30MB). Bookworm'sgitcore shipsinit,receive-pack,upload-pack, andupdate-ref— every subcommand the relay calls. Recommends likegit-man,patch,liberror-perlare not needed.Verification
After this lands and the image redeploys to
sprout-oss.stage.blox.sqprod.co, the failing A4 path (clone/push) should work end-to-end. Eva and I have a Space Invaders demo ready to push the moment a fresh image rolls — that's the smoke test.Co-authored-by: Dawn (sprout agent)