Skip to content

fix: docker image build for amd64 and arm64 separately #1364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

nikhilsinhaparseable
Copy link
Contributor

@nikhilsinhaparseable nikhilsinhaparseable commented Jul 2, 2025

Summary by CodeRabbit

  • Chores
    • Updated Docker image tags in build and release workflows to include architecture-specific suffixes for Kafka images.
    • Added steps in the release workflow to build and push Kafka Docker images separately for AMD64 and ARM64 platforms.

Copy link
Contributor

coderabbitai bot commented Jul 2, 2025

Walkthrough

The GitHub Actions workflows for building and releasing Docker images have been updated to add architecture-specific tags for Kafka images. Separate build and push steps for amd64 and arm64 architectures now use distinct tags and build arguments, both in the edge and release pipelines. No code or public entity declarations were changed.

Changes

File(s) Change Summary
.github/workflows/build-push-edge-kafka.yaml Updated Docker image tags to include architecture-specific suffixes for x86_64 and ARM64 builds.
.github/workflows/release.yml Added separate build and push steps for Kafka Docker images for amd64 and arm64 architectures, with specific tags and build args.

Poem

In the warren of workflows, new tags now appear,
For Kafka on ARM and x86, it's crystal clear!
With suffixes neat, the images align,
Each architecture gets its own sign.
Rabbits rejoice—no more Docker disguise,
Now every build fits just the right size! 🐇


🪧 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

🔭 Outside diff range comments (2)
.github/workflows/build-push-edge-kafka.yaml (1)

40-60: Preserve backward compatibility for the edge-kafka tag

Consumers currently pulling parseable/parseable:edge-kafka will start 404ing because only edge-kafka-amd64 and edge-kafka-arm64 are being pushed. To avoid breaking downstream users, add the original tag as an alias or publish a multi-arch manifest.

• File: .github/workflows/build-push-edge-kafka.yaml
– Line ~46 (x86_64 build)
– Line ~57 (aarch64 build)

Example: add the alias in each build step

-          tags: parseable/parseable:edge-kafka-amd64
+          tags: |
+            parseable/parseable:edge-kafka-amd64
+            parseable/parseable:edge-kafka       # backward-compatible alias

And similarly for the ARM64 block:

-          tags: parseable/parseable:edge-kafka-arm64
+          tags: |
+            parseable/parseable:edge-kafka-arm64
+            parseable/parseable:edge-kafka       # backward-compatible alias

Alternatively, after both builds add:

docker manifest create parseable/parseable:edge-kafka \
  --amend parseable/parseable:edge-kafka-amd64 \
  --amend parseable/parseable:edge-kafka-arm64
docker manifest push parseable/parseable:edge-kafka

This ensures edge-kafka continues to resolve to both architectures.

.github/workflows/release.yml (1)

233-254: Add a generic -kafka tag and consolidate the Kafka build steps
The current workflow only publishes …-kafka-amd64 and …-kafka-arm64, but omits the unsuffixed …-kafka tag that downstream Helm charts and users may expect. To restore compatibility and reduce duplication:

• In .github/workflows/release.yml (lines 233–254), update each Kafka build to also tag the generic image or publish a manifest list for ${{ github.ref_name }}-kafka.
• Consider collapsing both steps into a single multi-platform build if Dockerfile.kafka supports TARGETPLATFORM, or use a matrix to DRY out context, file, and push: true.

Example diff for the amd64 step:

       - name: Build and push kafka amd64
         uses: docker/build-push-action@v6
         with:
           context: .
           file: ./Dockerfile.kafka
           push: true
-          tags: parseable/parseable:${{ github.ref_name }}-kafka-amd64
+          tags: |
+            parseable/parseable:${{ github.ref_name }}-kafka
+            parseable/parseable:${{ github.ref_name }}-kafka-amd64
           platforms: linux/amd64
           build-args: |
             LIB_DIR=x86_64-linux-gnu

Repeat the same for the arm64 step, or replace both with:

  platforms: linux/amd64,linux/arm64
  tags:
    - parseable/parseable:${{ github.ref_name }}-kafka
    - parseable/parseable:${{ github.ref_name }}-kafka-${{ matrix.arch }}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7726912 and 33a1368.

📒 Files selected for processing (2)
  • .github/workflows/build-push-edge-kafka.yaml (2 hunks)
  • .github/workflows/release.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: nikhilsinhaparseable
PR: parseablehq/parseable#1302
File: .github/workflows/build.yaml:170-175
Timestamp: 2025-04-26T03:58:02.341Z
Learning: In the parseable project, the Linux-specific environment variables (PKG_CONFIG_PATH, SASL2_DIR, OPENSSL_DIR, OPENSSL_ROOT_DIR, SASL2_STATIC) in the Kafka build step of GitHub Actions workflows don't cause issues for macOS builds and can safely be applied to both platforms.
.github/workflows/release.yml (1)
Learnt from: nikhilsinhaparseable
PR: parseablehq/parseable#1302
File: .github/workflows/build.yaml:170-175
Timestamp: 2025-04-26T03:58:02.341Z
Learning: In the parseable project, the Linux-specific environment variables (PKG_CONFIG_PATH, SASL2_DIR, OPENSSL_DIR, OPENSSL_ROOT_DIR, SASL2_STATIC) in the Kafka build step of GitHub Actions workflows don't cause issues for macOS builds and can safely be applied to both platforms.
.github/workflows/build-push-edge-kafka.yaml (1)
Learnt from: nikhilsinhaparseable
PR: parseablehq/parseable#1302
File: .github/workflows/build.yaml:170-175
Timestamp: 2025-04-26T03:58:02.341Z
Learning: In the parseable project, the Linux-specific environment variables (PKG_CONFIG_PATH, SASL2_DIR, OPENSSL_DIR, OPENSSL_ROOT_DIR, SASL2_STATIC) in the Kafka build step of GitHub Actions workflows don't cause issues for macOS builds and can safely be applied to both platforms.
🪛 YAMLlint (1.37.1)
.github/workflows/release.yml

[error] 232-232: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: Quest Smoke and Load Tests for Standalone deployments
  • GitHub Check: Quest Smoke and Load Tests for Distributed deployments
  • GitHub Check: coverage
  • GitHub Check: Build Default x86_64-pc-windows-msvc
  • GitHub Check: Build Default aarch64-unknown-linux-gnu
  • GitHub Check: Build Default x86_64-apple-darwin
  • GitHub Check: Build Default aarch64-apple-darwin
  • GitHub Check: Build Default x86_64-unknown-linux-gnu
  • GitHub Check: Build Kafka x86_64-unknown-linux-gnu
  • GitHub Check: Build Kafka aarch64-apple-darwin

@nitisht nitisht merged commit 8bbdd22 into parseablehq:main Jul 2, 2025
14 checks passed
@nikhilsinhaparseable nikhilsinhaparseable deleted the update-workflows branch July 2, 2025 15:07
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