MULTIARCH-5995: add ppc64le support to the build#482
MULTIARCH-5995: add ppc64le support to the build#482raja-0940 wants to merge 1 commit intoKuadrant:mainfrom
Conversation
📝 WalkthroughWalkthroughAdds ppc64le (PowerPC 64-bit LE) build and test support: a new Changesppc64le build & CI
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (3)
Dockerfile.ppc64le (1)
4-6: ⚡ Quick winAvoid
apt-get upgradein the build layer for reproducible CI builds.On Line 4,
apt-get upgrade -yintroduces package drift between runs and makes failures harder to reproduce. Prefer installing only required packages and relying on refreshed base images.Proposed diff
-RUN apt-get update && apt-get upgrade -y && \ - apt-get install -y --no-install-recommends protobuf-compiler clang \ +RUN apt-get update && \ + apt-get install -y --no-install-recommends protobuf-compiler clang \ gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu libc6-dev-ppc64el-cross🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Dockerfile.ppc64le` around lines 4 - 6, The RUN layer currently calls "apt-get update && apt-get upgrade -y" which causes non-reproducible image builds; remove the "apt-get upgrade -y" step and change the RUN instruction so it only runs "apt-get update" followed by installing the required packages (protobuf-compiler, clang, gcc-powerpc64le-linux-gnu, g++-powerpc64le-linux-gnu, libc6-dev-ppc64el-cross) with "apt-get install -y --no-install-recommends" and optionally follow with a cleanup (apt-get clean / rm -rf /var/lib/apt/lists/*) to keep the image deterministic..github/workflows/build-image.yaml (1)
37-40: ⚡ Quick winAdd explicit QEMU setup in the build job for the new
linux/ppc64letarget.With the new matrix entry, non-native
RUNinstructions may depend on binfmt availability. Making QEMU setup explicit avoids runner-dependent flakiness.Proposed diff
steps: - name: Check out code uses: actions/checkout@v6 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64,s390x,ppc64le - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build-image.yaml around lines 37 - 40, The build matrix added a linux/ppc64le target but does not ensure QEMU/binfmt is registered, causing non-native RUN steps to fail; update the build job that uses the Dockerfile.ppc64le / platform linux/ppc64le / scope build-ppc64le to explicitly register QEMU before any docker build by adding steps to set up binfmt/QEMU (for example using actions/setup-qemu-action or tonistiigi/binfmt:setup or docker run --rm --privileged multiarch/qemu-user-static --reset -p yes) and enable buildx (actions/setup-buildx) so cross-platform runs succeed; place these steps at the start of the job, before the docker build/push steps that reference Dockerfile.ppc64le..github/workflows/rust.yml (1)
96-97: ⚡ Quick winMirror QEMU setup here as well for stable ppc64le image builds.
Since Line 96 and Line 97 add a non-native platform, this job should explicitly register QEMU before Buildx, otherwise builds can be environment-sensitive.
Proposed diff
steps: - uses: actions/checkout@v6 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64,s390x,ppc64le - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/rust.yml around lines 96 - 97, The workflow adds a non-native platform entry (dockerfile: Dockerfile.ppc64le / platform: linux/ppc64le) but doesn't register QEMU first; add a step before Buildx or the build steps to register QEMU emulators (e.g., run a privileged container such as tonistiigi/binfmt or multiarch/qemu-user-static to --install/reset) so ppc64le builds are stable across hosts; ensure this new step runs before any use of actions/setup-buildx or docker buildx invocations that reference Dockerfile.ppc64le or platform linux/ppc64le.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/build-image.yaml:
- Around line 37-40: The build matrix added a linux/ppc64le target but does not
ensure QEMU/binfmt is registered, causing non-native RUN steps to fail; update
the build job that uses the Dockerfile.ppc64le / platform linux/ppc64le / scope
build-ppc64le to explicitly register QEMU before any docker build by adding
steps to set up binfmt/QEMU (for example using actions/setup-qemu-action or
tonistiigi/binfmt:setup or docker run --rm --privileged
multiarch/qemu-user-static --reset -p yes) and enable buildx
(actions/setup-buildx) so cross-platform runs succeed; place these steps at the
start of the job, before the docker build/push steps that reference
Dockerfile.ppc64le.
In @.github/workflows/rust.yml:
- Around line 96-97: The workflow adds a non-native platform entry (dockerfile:
Dockerfile.ppc64le / platform: linux/ppc64le) but doesn't register QEMU first;
add a step before Buildx or the build steps to register QEMU emulators (e.g.,
run a privileged container such as tonistiigi/binfmt or
multiarch/qemu-user-static to --install/reset) so ppc64le builds are stable
across hosts; ensure this new step runs before any use of actions/setup-buildx
or docker buildx invocations that reference Dockerfile.ppc64le or platform
linux/ppc64le.
In `@Dockerfile.ppc64le`:
- Around line 4-6: The RUN layer currently calls "apt-get update && apt-get
upgrade -y" which causes non-reproducible image builds; remove the "apt-get
upgrade -y" step and change the RUN instruction so it only runs "apt-get update"
followed by installing the required packages (protobuf-compiler, clang,
gcc-powerpc64le-linux-gnu, g++-powerpc64le-linux-gnu, libc6-dev-ppc64el-cross)
with "apt-get install -y --no-install-recommends" and optionally follow with a
cleanup (apt-get clean / rm -rf /var/lib/apt/lists/*) to keep the image
deterministic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8659b221-d6a7-4dad-9612-624665287a52
📒 Files selected for processing (3)
.github/workflows/build-image.yaml.github/workflows/rust.ymlDockerfile.ppc64le
|
Looking good. Waiting for the test to pass before approving |
|
There is a clippy (linter) issue not related to this PR.It's been addressed in #483 |
Signed-off-by: Rajakumar Battula <rbattula@redhat.com>
Enable ppc64le images in CI
Summary by CodeRabbit
New Features
Tests