Repository navigation
fix(relay): build the relay image like the compose binary - #14497
Merged
Merged
Conversation
The relay image ran its Go toolchain stage on the target platform, so every platform it ships for needed a golang:alpine image of its own. The golang:1.27.4-alpine tag has no linux/riscv64 variant (1.26 had one), which fails the riscv64 leg of relay-image and relay-image-test on main since the move to Go 1.27. Build it the way the compose binary is built: the toolchain runs on the build platform, from the same pinned golang alpine image, and xx cross-compiles for the target and checks that the result is static. No platform depends on what the golang image publishes any more. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
3 tasks
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.
What this PR does
Builds the relay image the way the compose binary is built, on the build platform and cross-compiled with xx, so that it no longer depends on which platforms the
golangimage publishes.Context
Since the move to Go 1.27, the riscv64 leg of
relay-imagefails on main, and so doesrelay-image-teston every PR:golang:1.27.4-alpinehas nolinux/riscv64variant (golang:1.26-alpinehad one), and the relay's Dockerfile ran its Go toolchain stage on the target platform, so it pulled the image for riscv64.The compose binary has no such problem. Its Dockerfile runs the toolchain on the build platform, from a pinned
golangalpine image, and xx cross-compiles for the target. The relay was the one image built the other way.What the PR brings
golangalpine image as the root Dockerfile, withxx-gocross-compiling for the target andxx-verify --staticchecking the result. No platform depends on what thegolangimage publishes.relay-image-crosslocally (amd64, arm/v6, arm/v7, arm64, ppc64le, riscv64, s390x) and checked the architecture of each binary. Theteststage also runs for riscv64 now, on the build platform../relay).🤖 Generated with Claude Code