Skip to content

Conversation

@grdryn
Copy link
Member

@grdryn grdryn commented Jul 13, 2025

Description

The bazel5 RPMs used here from the galileo/bazel COPR repo are built
by grdryn for EL9 on EL9 builders in Fedora COPR
infrastructure. They're built for all 4 of our target architectures,
which means that we should be able to use it to build programs on all
of x86_64, aarch64, ppc64le, and s390x.

The patch that @PankhudiJ17 added to allow for ppc64le builds also
allows aarch64 builds when a similar change is made, so that's added
to the patch file here too.

How Has This Been Tested?

  • Built on x86_64, aarch64, and ppc64le on Konflux, index image reference can be found here:
quay.io/redhat-user-workloads/open-data-hub-tenant/ml-metadata-multi-arch-poc@sha256:1cc0e94038bb29c5da1f9c371da678602fb79e85d5792c9530fb310cdc09c299
  • Verified that the image looks reasonable on aarch64, and starts:
➜ podman run --rm -ti --entrypoint bash quay.io/redhat-user-workloads/open-data-hub-tenant/ml-metadata-multi-arch-poc@sha256:1cc0e94038bb29c5da1f9c371da678602fb79e85d5792c9530fb310cdc09c299

bash-5.1$ cat /etc/system-release
Red Hat Enterprise Linux release 9.6 (Plow)
bash-5.1$ uname -a
Linux e46b95f078f1 6.15.3-200.fc42.aarch64 #1 SMP PREEMPT_DYNAMIC Thu Jun 19 15:27:43 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
bash-5.1$ ldd /bin/metadata_store_server 
	linux-vdso.so.1 (0x0000ffff9ec8f000)
	libm.so.6 => /lib64/libm.so.6 (0x0000ffff9eb9f000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x0000ffff9e97b000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000ffff9e94a000)
	libc.so.6 => /lib64/libc.so.6 (0x0000ffff9e79c000)
	/lib/ld-linux-aarch64.so.1 (0x0000ffff9ec40000)
bash-5.1$ metadata_store_server
WARNING: Logging before InitGoogleLogging() is written to STDERR
W0713 22:09:24.880488    12 metadata_store_server_main.cc:460] The connection_config is not given. Using in memory fake database, any metadata will not be persistent
I0713 22:09:24.887391    12 metadata_store_server_main.cc:639] Server listening on 0.0.0.0:8080
^C
  • I didn't do any testing using any real use cases or make any requests against the running service, since I don't know how to do that yet.

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Summary by CodeRabbit

  • Bug Fixes

    • Improved compatibility for ARM 64-bit architectures by updating internal logic to correctly bypass unsupported CPU feature detection.
  • Chores

    • Streamlined Bazel installation in the Red Hat-based Docker build environment for easier maintenance.
    • Simplified and optimized package management in the Docker runtime image to reduce image size and ensure timezone data is present.

@coderabbitai
Copy link

coderabbitai bot commented Jul 13, 2025

Walkthrough

The updates extend conditional compilation in a PostgreSQL patch to exclude ARM 64-bit architectures from certain CPU feature detection logic. Separately, the Red Hat-based Dockerfile is modified to install Bazel via Fedora Copr and streamline package management, with minor formatting adjustments. No public APIs or exported declarations are changed.

Changes

File(s) Change Summary
ml_metadata/third_party/postgresql.patch Expanded conditional compilation to exclude ARM 64-bit architectures from CPU feature detection logic and header inclusion in pg_bitutils.c. Adds immediate return for ARM 64-bit in pg_popcount_available().
ml_metadata/tools/docker_server/Dockerfile.redhat Switched Bazel installation to Fedora Copr repository, consolidated dependency installation, and simplified runtime image package management. Minor formatting and comment adjustments.

Possibly related PRs

  • Added GCC-11 and Power support #19: Also modifies conditional compilation in pg_bitutils.c, focusing on excluding PowerPC architectures, closely related to the ARM64 exclusion in this PR.

Poem

In the warren of code, a patch hops through,
ARM64 and PowerPC, now both bid adieu.
Dockerfile cleaned, Bazel fetched with flair,
Packages installed with streamlined care.
🐇 With every commit, the garden grows neat—
Hopping ahead, our build is complete!


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 36be6f1 and ed63672.

📒 Files selected for processing (1)
  • ml_metadata/tools/docker_server/Dockerfile.redhat (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • ml_metadata/tools/docker_server/Dockerfile.redhat

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

@grdryn grdryn changed the title Use bazel5 RPM; add aarch64 to postgresql patchAarch64 Use bazel5 RPM; add aarch64 to postgresql patch Jul 13, 2025
@grdryn
Copy link
Member Author

grdryn commented Jul 13, 2025

@VaniHaripriya Would you be a good person to review this from your team? 🙂

@PankhudiJ17 I'd also appreciate a review from you, since I'm touching your recent patch, and updated the Dockerfile to use a bazel that can also build for ppc64le (and actually built an image for it).

Copy link

@rareddy rareddy left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@rareddy rareddy merged commit 8534b66 into opendatahub-io:master Jul 18, 2025
2 checks passed
@grdryn grdryn deleted the aarch64 branch July 18, 2025 16:45
grdryn added a commit to grdryn/ml-metadata that referenced this pull request Aug 5, 2025
This is a manual cherry-pick of the following PR in ODH:
opendatahub-io#21
grdryn added a commit to grdryn/ml-metadata that referenced this pull request Aug 7, 2025
This is a manual cherry-pick of the changes from the following PR in
ODH, to the Dockerfile.konflux:
opendatahub-io#21
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