[Heads-up] Proposed migration from rules_oci to rules_img (Bazel 7.5.0 + Java 21)

21 views
Skip to first unread message

Vamsikrishna Siddu

unread,
May 19, 2026, 1:59:31 AM (yesterday) May 19
to kubevirt-dev

Hi everyone,

I'd like to give a heads-up about a proposed change to KubeVirt's build system: PR #17598.

What is being proposed?

Migration of all container image builds from rules_oci to rules_img v0.3.9, along with upgrading Bazel from 6.5.0 to 7.5.0 and Java from 11 to 21 in the builder images.

The key changes include:

  • oci_image replaced by image_manifest + layer_from_tar (wrapped in a kubevirt_image macro)
  • oci_push replaced by image_push (with separate --registry and --repository flags)
  • oci_pull replaced by pull() (with registry and repository as separate fields)
  • rules_oci dependency fully removed from WORKSPACE
  • Builder images updated to Bazel 7.5.0 + Java 21

Why?

The primary motivation is enabling native s390x platform support for KubeVirt builds (issue #17113). rules_oci lacks native s390x support, which blocks the addition of a dedicated s390x presubmit test lane (project-infra#4595).

Additionally, rules_img provides proper platform validation -- builds fail fast if a base image doesn't match the target architecture, instead of silently producing images with wrong-platform base layers.

Potential downstream impact

If you have automation or projects that depend on KubeVirt's Bazel workspace, please be aware of:

  1. Bazel version: 6.5.0 -> 7.5.0
  2. Java version: 11 -> 21
  3. Image rules: oci_image/oci_push/oci_pull replaced by rules_img equivalents
  4. Push script flags: hack/bazel-push-images.sh now passes --registry and --repository separately

If you have any concerns or questions about downstream compatibility, please comment on the PR or reply to this thread.


Thanks,

Siddu Vamsikrishna,

Software Engineer- OpenShift Virtualization on IBM Z,

IBM R&D Bangalore.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages