Skip to content

Conversation

@matysek
Copy link
Contributor

@matysek matysek commented Jul 10, 2025

Description

LCORE-326: Add arm64 image building for releases

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement

Summary by CodeRabbit

  • New Features

    • Container images are now built for both amd64 and arm64 platforms, supporting a wider range of devices including Macs with M1, M2, or M3 CPUs.
  • Documentation

    • Updated the README to specify supported platforms for container images.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 10, 2025

Walkthrough

The build workflow was updated to support multi-architecture container images for both amd64 and arm64 by installing additional tools and updating build steps. The README was revised to document the new supported platforms, specifying compatibility with both Linux amd64 and arm64 architectures.

Changes

File(s) Change Summary
.github/workflows/build_and_push_release.yaml Updated workflow to install qemu-user-static, build images for amd64 and arm64, and add steps to verify and inspect multi-arch images.
README.md Added documentation about supported container platforms: linux/amd64 and linux/arm64.

Sequence Diagram(s)

sequenceDiagram
    participant Workflow
    participant Buildah
    participant QEMU
    participant Registry

    Workflow->>QEMU: Install qemu-user-static
    Workflow->>Buildah: Build image (amd64, arm64)
    Buildah-->>Workflow: Build outputs
    Workflow->>Buildah: List built images
    Buildah-->>Workflow: Image list
    Workflow->>Buildah: Inspect manifest (latest)
    Buildah-->>Workflow: Manifest details
    Workflow->>Registry: Push multi-arch image
Loading

Poem

In the warren where containers grow,
Now two arches in a row!
AMD and ARM, side by side,
For every bunny far and wide.
With QEMU’s magic, builds take flight—
Multi-arch dreams hop into sight! 🐰✨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@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.

Actionable comments posted: 1

🧹 Nitpick comments (4)
.github/workflows/build_and_push_release.yaml (3)

26-29: Install binfmt properly & keep image lean

qemu-user-static alone may not register the ARM handler; binfmt-support is usually pulled in as a dependency but being explicit prevents sporadic failures.
While you are here, adding --no-install-recommends avoids pulling ~200 MiB of unrelated packages.

-          sudo apt install -y buildah qemu-user-static
+          sudo apt-get install -y --no-install-recommends buildah qemu-user-static binfmt-support

43-48: Harden ad-hoc verification step

If grep finds nothing the pipeline fails (good), but other errors in the script will be swallowed. A minimal set -euo pipefail makes the step fail-fast and surfaces typos.

-          buildah images | grep '${{ env.IMAGE_NAME }}'
+          set -euo pipefail
+          buildah images | grep '${{ env.IMAGE_NAME }}'

49-52: Mirror the safety guard on manifest inspection

Same reasoning as above – propagate early errors.

-          set -x
+          set -euo pipefail -x
README.md (1)

180-183: Tiny formatting glitch

Missing space after the dash.

-1. `linux/arm64`- Mac users with M1/M2/M3 CPUs
+1. `linux/arm64` - Mac users with M1/M2/M3 CPUs
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 17bf0c3 and f5aa9c6.

📒 Files selected for processing (2)
  • .github/workflows/build_and_push_release.yaml (2 hunks)
  • README.md (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-pr

${{ env.LATEST_TAG }}
containerfiles: |
${{ env.CONTAINER_FILE }}
archs: amd64, arm64
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Whitespace in archs input may break manifest creation

The action splits on commas; the extra space is preserved on some Node versions and causes an “unsupported architecture ‘ arm64’ ” error.

-          archs: amd64, arm64
+          archs: amd64,arm64
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
archs: amd64, arm64
archs: amd64,arm64
🤖 Prompt for AI Agents
In .github/workflows/build_and_push_release.yaml at line 41, remove the space
after the comma in the archs input so it reads "amd64,arm64" without any spaces.
This prevents the action from interpreting the architecture string with leading
whitespace, which causes errors during manifest creation.

Copy link
Contributor

@tisnik tisnik left a comment

Choose a reason for hiding this comment

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

LGTM

@tisnik tisnik merged commit 5e9f001 into lightspeed-core:main Jul 10, 2025
17 checks passed
@matysek matysek deleted the lcore-326-2 branch July 10, 2025 08:22
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