Skip to content

fix(cli-yq): use multi-arch base image for arm64 support - #82620

Open
Prucek wants to merge 1 commit into
openshift:mainfrom
Prucek:cli-yq-multiarch
Open

fix(cli-yq): use multi-arch base image for arm64 support#82620
Prucek wants to merge 1 commit into
openshift:mainfrom
Prucek:cli-yq-multiarch

Conversation

@Prucek

@Prucek Prucek commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Switch cli-yq from ocp_4.18_cli (amd64-only) to ocp_4.19_base-rhel9 which supports both amd64 and arm64
  • Install oc client from the OpenShift mirror since the new base image doesn't include it
  • Adjust yq download to dynamically select the correct binary based on architecture via uname -m

Summary by CodeRabbit

Updates the cli-yq supplemental CI image configuration to support arm64 by switching to the multi-architecture quay.io/openshift/ci:ocp_4.19_base-rhel9 base image. The embedded Dockerfile now downloads the architecture-matched oc client tarball from the OpenShift 4.19 client mirror based on uname -m (x86_64 vs aarch64) and extracts it into /usr/local/bin. It also improves the yq install by selecting yq_linux_amd64 vs yq_linux_arm64 dynamically from GitHub releases, using curl --fail --retry 3, placing the binary in /usr/local/bin, and ensuring it’s executable (with jq still installed via yum install -y jq).

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 80b95eda-d814-4eb3-8b83-755f14c6ce2f

📥 Commits

Reviewing files that changed from the base of the PR and between e950db8 and 5f8cdd3.

📒 Files selected for processing (1)
  • clusters/build-clusters/build-shared/supplemental-ci-images/cli-yq_mabc.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • clusters/build-clusters/build-shared/supplemental-ci-images/cli-yq_mabc.yaml

Walkthrough

The cli-yq supplemental CI image now uses the OCP 4.19 RHEL9 base, installs the matching architecture-specific oc client, improves yq download handling, and retains jq installation.

Changes

CLI yq image build

Layer / File(s) Summary
OCP 4.19 image build
clusters/build-clusters/build-shared/supplemental-ci-images/cli-yq_mabc.yaml
The Dockerfile and build strategy switch to the OCP 4.19 RHEL9 image, download the matching oc client, add retry and failure handling for yq, and retain jq installation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: pruan-rht, smg247

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: switching cli-yq to a multi-arch base image for arm64 support.
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.
Stable And Deterministic Test Names ✅ Passed The commit only changes cli-yq_mabc.yaml; no *_test.go files or Ginkgo titles were added or edited.
Test Structure And Quality ✅ Passed PR only changes a build YAML; no Ginkgo or Go test files were modified, so the test-structure check is not applicable.
Microshift Test Compatibility ✅ Passed PR only changes a ci build config YAML; no Ginkgo tests or OpenShift API usage were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only a build-image YAML changed; no It/Describe/Context/When or SNO-sensitive test code was added.
Topology-Aware Scheduling Compatibility ✅ Passed PASS: This only updates a MultiArchBuildConfig/Dockerfile; no workload scheduling fields (nodeSelector, affinity, replicas, PDBs) were added.
Ote Binary Stdout Contract ✅ Passed PR changes only a MultiArchBuildConfig YAML; no process-level code or stdout-producing entrypoints were modified.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests were added or modified; the PR only updates a build config, so the IPv6/disconnected test check is not applicable.
No-Weak-Crypto ✅ Passed Touched YAML only downloads oc/yq and installs jq; no weak-crypto algorithms, custom crypto, or secret comparisons are present.
Container-Privileges ✅ Passed The only changed manifest is a MultiArchBuildConfig and it contains no privileged:true, hostPID/Network/IPC, SYS_ADMIN, allowPrivilegeEscalation, or root-run settings.
No-Sensitive-Data-In-Logs ✅ Passed The only new log output is a benign unsupported-architecture message; no passwords, tokens, PII, internal hostnames, or customer data are logged.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@clusters/build-clusters/build-shared/supplemental-ci-images/cli-yq_mabc.yaml`:
- Around line 22-29: Update the architecture selection in the RUN command so it
explicitly maps aarch64 to the arm64 archive and x86_64 to the standard archive,
while rejecting all other values with a nonzero exit before curl runs. Preserve
the existing URL and extraction flow for supported architectures.
- Around line 30-36: Update the yq download step in the RUN command to install
the executable from /tmp/yq into a directory on PATH, such as /usr/local/bin/yq,
while preserving the architecture selection and download behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 679520ce-6289-4ca5-a147-1ff90f7b6b82

📥 Commits

Reviewing files that changed from the base of the PR and between 811465a and e950db8.

📒 Files selected for processing (1)
  • clusters/build-clusters/build-shared/supplemental-ci-images/cli-yq_mabc.yaml

Comment thread clusters/build-clusters/build-shared/supplemental-ci-images/cli-yq_mabc.yaml Outdated
@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Prucek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 29, 2026
@openshift-ci
openshift-ci Bot requested review from pruan-rht and smg247 July 29, 2026 15:01
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@Prucek: pj-rehearse could not automatically process this event because the request waited in queue for longer than 5 minutes. Use /pj-rehearse to trigger rehearsals manually.

Switch from ocp_4.18_cli (amd64-only) to ocp_4.19_base-rhel9
(amd64+arm64) and install oc client from the OpenShift mirror.
@Prucek
Prucek force-pushed the cli-yq-multiarch branch from e950db8 to 5f8cdd3 Compare July 29, 2026 16:37
@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 29, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@Prucek: no rehearsable tests are affected by this change

Note: If this PR includes changes to step registry files (ci-operator/step-registry/) and you expected jobs to be found, try rebasing your PR onto the base branch. This helps pj-rehearse accurately detect changes when the base branch has moved forward.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@Prucek: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant