Skip to content

MULTIARCH-5995: add ppc64le support to the build#482

Open
raja-0940 wants to merge 1 commit intoKuadrant:mainfrom
raja-0940:main
Open

MULTIARCH-5995: add ppc64le support to the build#482
raja-0940 wants to merge 1 commit intoKuadrant:mainfrom
raja-0940:main

Conversation

@raja-0940
Copy link
Copy Markdown

@raja-0940 raja-0940 commented Apr 30, 2026

Enable ppc64le images in CI

Summary by CodeRabbit

  • New Features

    • Added PPC64LE architecture support with automated builds and image publishing.
  • Tests

    • Updated smoke tests and platform checks to include Linux/ppc64le alongside existing architectures.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

📝 Walkthrough

Walkthrough

Adds ppc64le (PowerPC 64-bit LE) build and test support: a new Dockerfile.ppc64le for cross-compiling limitador-server and updates to CI build matrices and smoke-test steps to include linux/ppc64le.

Changes

ppc64le build & CI

Layer / File(s) Summary
Build matrix
.github/workflows/build-image.yaml, .github/workflows/rust.yml
Adds an include entry for linux/ppc64le referencing Dockerfile.ppc64le, with CI cache scope build-ppc64le and artifact suffix ppc64le.
Cross‑compile build stage
Dockerfile.ppc64le (build stage)
Adds limitador-build stage using rust:1.88, installs cross GCC/G++, libc6-dev-ppc64el-cross, adds powerpc64le-unknown-linux-gnu Rust target, configures RUSTFLAGS and target linker/CC/CXX, sets BINDGEN_EXTRA_CLANG_ARGS, and runs cargo build --release --target powerpc64le-unknown-linux-gnu.
Runtime stage & packaging
Dockerfile.ppc64le (runtime stage)
Uses registry.access.redhat.com/ubi10/ubi-minimal:10.1, installs libgcc, libstdc++, shadow-utils, cleans RPM metadata, creates non-root limitador user (UID 1000), places limitador-server and limits.yaml into /home/limitador/bin/, sets ownership/permissions, and sets ENTRYPOINT ["limitador-server"].
Smoke tests
.github/workflows/build-image.yaml
Adds docker run --platform linux/ppc64le invocation to the Smoke Test step alongside existing amd64/arm64/s390x runs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Kuadrant/limitador#479 — Similar changes adding a cross-architecture build target and Dockerfile for that architecture.

Suggested reviewers

  • KevFan

Poem

🐰 Power hops to a new machine,
Little-endian leaves fields green,
Cross‑compile carrots, tidy and neat,
Docker and CI make the treat,
A rabbit cheers — builds run complete!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and specifically describes the main change: adding ppc64le support to the build process, which is directly reflected in the workflow updates and new Dockerfile.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
Dockerfile.ppc64le (1)

4-6: ⚡ Quick win

Avoid apt-get upgrade in the build layer for reproducible CI builds.

On Line 4, apt-get upgrade -y introduces 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 win

Add explicit QEMU setup in the build job for the new linux/ppc64le target.

With the new matrix entry, non-native RUN instructions 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 win

Mirror 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

📥 Commits

Reviewing files that changed from the base of the PR and between d3a2f72 and 640500a.

📒 Files selected for processing (3)
  • .github/workflows/build-image.yaml
  • .github/workflows/rust.yml
  • Dockerfile.ppc64le

@eguzki
Copy link
Copy Markdown
Contributor

eguzki commented May 4, 2026

Looking good. Waiting for the test to pass before approving

@eguzki
Copy link
Copy Markdown
Contributor

eguzki commented May 4, 2026

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>
@raja-0940 raja-0940 changed the title Enable ppc64le images in CI MULTIARCH-5995: add ppc64le support to the build May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants