Skip to content

Conversation

praveenkumar
Copy link
Member

@praveenkumar praveenkumar commented Aug 19, 2025

By default crc support 2 major release so better to update the images to rhel-9 since rhel-10 is released and available from quite some time.

Summary by CodeRabbit

  • Chores
    • Upgraded build and development base images from RHEL 8 to RHEL 9 for improved security and compatibility.
    • Bumped Go toolchain across CI, local builds, and tooling to 1.24.
    • Updated verification and CI workflows to use the new base images and Go version.
    • Enhanced the version-update script to propagate the new base image and Go version across build and installer workflows.

These changes standardize and modernize the build environment.

…lang

By default crc support 2 major release so better to update the images to
rhel-9 since rhel-10 is released and available from quite some time.
Copy link

coderabbitai bot commented Aug 19, 2025

Walkthrough

RHEL base images and Go versions were bumped from rhel-8/golang-1.23 to rhel-9/golang-1.24 across devcontainer, CI workflows, and multiple image build files; the update-go-version.sh script was extended to propagate the new tags and to update an additional build-installer workflow matrix entry.

Changes

Cohort / File(s) Summary
Dev container & verify workflow
.devcontainer/devcontainer.json, .github/workflows/verify-devcontainer.yml
Replace RHEL-8 devcontainer/verify image tag with RHEL-9 (golang-1.24-openshift-4.20); no other fields changed.
Builder images (Dockerfile / Containerfile)
images/build/Dockerfile, images/build-e2e/Containerfile, images/build-integration/Containerfile, images/openshift-ci/Dockerfile
Update builder-stage FROM lines to RHEL-9 release image (golang-1.24-openshift-4.20); build stages and logic unchanged (one file adds trailing newline).
GitHub Actions matrices
.github/workflows/*.yml (multiple: make-check.yml, make-check-win.yml, make-rpm.yml, macos-installer.yml, choco-release.yml, qe-image.yml, test-okd-bundle.yml, windows-artifacts.yml, windows-chocolatey.yml, etc.)
Update matrix Go versions from 1.23 → 1.24; no other workflow logic changed.
Makefile and go.mod files
Makefile, go.mod, tools/go.mod
Bump GOVERSION and go directives: Makefile GOVERSION 1.23→1.24; module Go version updates in go.mod (1.23.0→1.24.0) and tools/go.mod (1.23.1→1.24.1).
Version update script
update-go-version.sh
Extend sed replacements to switch rhel-8 → rhel-9 image tags (images//Dockerfile, images//Containerfile, .devcontainer/devcontainer.json, verify-devcontainer workflow) and add updates for .jobs.build-installer.strategy.matrix.go[0] when present; maintains existing GOVERSION/go.mod updates.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Script as update-go-version.sh
  participant Files as Repo files
  participant CI as GitHub Workflows

  Dev->>Script: invoke with new golang_base_version
  Script->>Files: scan targets (images/*, .devcontainer, go.mod, Makefile, tools/go.mod)
  Note right of Script: compute rhel-9 image tag & go versions
  Script->>Files: replace rhel-8-release-golang-* → rhel-9-release-golang-*
  Script->>Files: update Makefile GOVERSION, go.mod, tools/go.mod
  Script->>CI: update matrix.go entries (including build-installer matrix entry)
  Script-->>Dev: write changes / exit
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I twitch my whiskers at nine’s new shine,
Hop from eight to fresher vine—so fine!
Builders brew in crimson hue,
Workflows nod, “we’re raring too.”
My little paws stamp: new versions, go! 🐇🚀

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

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

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@openshift-ci openshift-ci bot requested review from cfergeau and gbraad August 19, 2025 08:57
Copy link

@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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
images/openshift-ci/Dockerfile (1)

18-19: Update Google Cloud SDK repo to target RHEL9
The google-cloud-sdk.repo still points at the EL8 endpoint and will fail on UBI9. Change its baseurl to the EL9 equivalent. The Azure CLI repo has no EL8 markers and is OS-agnostic—no update needed there.

• images/openshift-ci/google-cloud-sdk.repo, line 3:

-baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el8-x86_64
+baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
update-go-version.sh (1)

19-26: Prevent yq null-path crashes and ensure Go matrix value is a quoted string.

Current checks can error when a workflow lacks the matrix path (null piped to has("go") can fail), and the assignment writes 1.x as a YAML number, making style="single" a no-op. Quote the value and make the path checks null-safe. Also, quote the command substitution in [ ] to avoid word-splitting issues.

Apply the following diff:

-for f in .github/workflows/*.yml; do
-    if [ $(yq  eval '.jobs.build.strategy.matrix | has("go")' "$f") == "true" ]; then
-      yq eval --inplace ".jobs.build.strategy.matrix.go[0] = ${golang_base_version} | .jobs.build.strategy.matrix.go[0] style=\"single\"" "$f";
-    fi
-    if [ $(yq  eval '.jobs.build-installer.strategy.matrix | has("go")' "$f") == "true" ]; then
-      yq eval --inplace ".jobs.build-installer.strategy.matrix.go[0] = ${golang_base_version} | .jobs.build-installer.strategy.matrix.go[0] style=\"single\"" "$f";
-    fi
-done
+for f in .github/workflows/*.yml; do
+    if [ "$(yq eval '.jobs.build.strategy.matrix // {} | has("go")' "$f")" = "true" ]; then
+      yq eval --inplace '.jobs.build.strategy.matrix.go[0] = "'$golang_base_version'" | .jobs.build.strategy.matrix.go[0] style="single"' "$f"
+    fi
+    if [ "$(yq eval '.jobs.build-installer.strategy.matrix // {} | has("go")' "$f")" = "true" ]; then
+      yq eval --inplace '.jobs.build-installer.strategy.matrix.go[0] = "'$golang_base_version'" | .jobs.build-installer.strategy.matrix.go[0] style="single"' "$f"
+    fi
+done

Notes:

  • Using // {} ensures has("go") receives a map even when the path is missing.
  • Assigning "'$golang_base_version'" writes a YAML string; setting style="single" then reliably yields a single-quoted scalar, avoiding YAML float interpretation.
  • Quoting the command substitution protects the [ ] comparison from word-splitting.
🧹 Nitpick comments (5)
images/build/Dockerfile (2)

2-2: Replace deprecated MAINTAINER with an OCI label

MAINTAINER is deprecated (Hadolint DL4000). Prefer an OCI-compliant label to avoid linter failures.

Apply this diff:

-MAINTAINER CRC <[email protected]>
+LABEL org.opencontainers.image.authors="CRC <[email protected]>"

8-8: Optional: pin final base image to a digest for reproducible builds

Pinning ubi9 to a sha256 digest (and doing the same for the builder image) helps avoid supply-chain drift.

Example:

-FROM registry.access.redhat.com/ubi9/ubi
+# e.g., pin to a known-good digest
+FROM registry.access.redhat.com/ubi9/ubi@sha256:<digest>

If you’d like, I can help resolve and propose specific digests currently used in CI.

images/openshift-ci/Dockerfile (1)

21-30: Optional: prefer dnf on UBI9 and keep cache paths consistent

On UBI9, dnf is the canonical tool. If reproducibility matters, consider dropping the unconditional update. If security freshness matters, keep update but switch to dnf and clean the correct cache path.

Suggested diff:

-RUN yum update -y && \
-    yum install --setopt=tsflags=nodocs -y \
+RUN dnf -y update && \
+    dnf -y install --setopt=tsflags=nodocs \
     google-cloud-sdk \
     nss_wrapper \
     unzip \
     sshpass \
     jq \
     azure-cli \
     openssh-clients && \
-    yum clean all && rm -rf /var/cache/yum/*
+    dnf clean all && rm -rf /var/cache/dnf/*
update-go-version.sh (1)

16-18: RHEL-9 sed replacements look correct; consider whitespace-tolerant match and safer glob handling.

Your anchoring to the FROM line and the captured suffix is solid. Two optional robustness tweaks:

  • Allow leading whitespace before FROM (some Dockerfiles/Containerfiles indent multi-stage lines).
  • If a glob (images//Dockerfile or images//Containerfile) has no matches, sed -i will fail and abort due to set -e. Guarding against missing files avoids surprising failures.

You can apply the whitespace-tolerant pattern directly here:

-sed -i "s,^\(FROM registry.ci.openshift.org/openshift/release:rhel-9-release-golang-\)1.[0-9]\+,\1${golang_base_version}," images/*/Dockerfile
-sed -i "s,^\(FROM registry.ci.openshift.org/openshift/release:rhel-9-release-golang-\)1.[0-9]\+,\1${golang_base_version}," images/*/Containerfile
+sed -i "s,^[[:space:]]*\(FROM registry.ci.openshift.org/openshift/release:rhel-9-release-golang-\)1\.[0-9]\+,\1${golang_base_version}," images/*/Dockerfile
+sed -i "s,^[[:space:]]*\(FROM registry.ci.openshift.org/openshift/release:rhel-9-release-golang-\)1\.[0-9]\+,\1${golang_base_version}," images/*/Containerfile

If you want to avoid failures when no files match, enable nullglob near the top (outside this hunk):

shopt -s nullglob
.github/workflows/verify-devcontainer.yml (1)

11-11: RHEL 9 base image switch looks good; consider pinning by digest for reproducibility.

The new image tag aligns with the PR goal. For CI determinism and supply-chain hardening, consider pinning the image to a digest to avoid tag drift.

For example:

- image: registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.23-openshift-4.19
+ image: registry.ci.openshift.org/openshift/release@sha256:<digest-for-rhel-9-release-golang-1.23-openshift-4.19>

If pinning isn’t desirable, you can keep the tag as-is.

📜 Review details

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

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a3947d8 and ef74f46.

📒 Files selected for processing (7)
  • .devcontainer/devcontainer.json (1 hunks)
  • .github/workflows/verify-devcontainer.yml (1 hunks)
  • images/build-e2e/Containerfile (1 hunks)
  • images/build-integration/Containerfile (1 hunks)
  • images/build/Dockerfile (1 hunks)
  • images/openshift-ci/Dockerfile (1 hunks)
  • update-go-version.sh (2 hunks)
🧰 Additional context used
🪛 Hadolint (2.12.0)
images/build/Dockerfile

[error] 2-2: MAINTAINER is deprecated

(DL4000)

🔇 Additional comments (7)
images/build-e2e/Containerfile (1)

2-2: RHEL 9 builder base image update — LGTM

Alignment with the two-major-release policy looks good; no functional changes in the stage.

images/build/Dockerfile (2)

1-1: RHEL 9 builder base image update — LGTM

Consistent with the rest of the PR; no behavioral change expected in the build stage.


9-9: COPY from builder — LGTM

No change in semantics; path and destination remain correct.

.devcontainer/devcontainer.json (1)

3-3: Devcontainer image moved to RHEL 9 — LGTM

Keeps Go/OpenShift tags consistent with builder images used in CI.

images/build-integration/Containerfile (1)

2-2: RHEL 9 builder base image update — LGTM

Matches the e2e and CI Dockerfiles; build flow unchanged.

images/openshift-ci/Dockerfile (1)

4-4: RHEL 9 builder base image update — LGTM

Consistent with the other image updates; no changes to the rest of the pipeline.

update-go-version.sh (1)

28-28: LGTM on verify-devcontainer sed target.

The pattern targets the image reference in verify-devcontainer.yml correctly to RHEL 9.

Looks like openshift-4.19 doesn't have tag for golang-1.24 but openshift 4.20 have
it for both 1.23 and 1.24 `registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.23-openshift-4.20`
since plan is to update the golang version to 1.24 in following commit
so switching to 4.20
Since 1.25 is released and now most of the dep modules are switching to
use 1.24 in the mod file since 1.23 is EOL https://endoflife.date/go
Copy link

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/qe-image.yml (1)

33-33: Shebang typo will break script execution (Exec format error).

The generated script starts with !#/bin/bash instead of #!/bin/bash. Since it’s executed as ./build-qe-images.sh, this will fail at runtime.

Apply this fix:

-          !#/bin/bash
+          #!/bin/bash
images/openshift-ci/Dockerfile (1)

18-21: Update google-cloud-sdk.repo to target EL9 repositories

  • images/openshift-ci/google-cloud-sdk.repo (line 3) currently uses
    baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el8-x86_64
    which will fail on UBI9.
  • images/openshift-ci/azure-cli.repo contains no EL8 references and is EL9-compatible.

Recommendation:

  • Change the Google Cloud SDK baseurl to
    https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
    or switch to using $releasever if supported.
🧹 Nitpick comments (3)
.github/workflows/qe-image.yml (1)

41-43: Optional: invoke the script via bash to reduce reliance on the shebang.

Even with the shebang fixed, calling via bash is a bit more robust on CI runners.

-          chmod +x build-qe-images.sh
-          ./build-qe-images.sh
+          chmod +x build-qe-images.sh
+          bash ./build-qe-images.sh
images/build/Dockerfile (2)

1-1: Base image bump to rhel-9/go1.24 looks correct and aligned with UBI9 runtime.

Matches the repo-wide upgrade and should avoid glibc/openssl mismatches. Consider digest-pinning the base image for reproducibility.


2-2: Replace deprecated MAINTAINER with LABEL to satisfy hadolint (DL4000).

Modern Dockerfiles should not use MAINTAINER. Replace with LABEL.

-MAINTAINER CRC <[email protected]>
+LABEL maintainer="CRC <[email protected]>"
📜 Review details

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

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ef74f46 and ad0ce65.

📒 Files selected for processing (18)
  • .devcontainer/devcontainer.json (1 hunks)
  • .github/workflows/choco-release.yml (1 hunks)
  • .github/workflows/macos-installer.yml (1 hunks)
  • .github/workflows/make-check-win.yml (1 hunks)
  • .github/workflows/make-check.yml (1 hunks)
  • .github/workflows/make-rpm.yml (1 hunks)
  • .github/workflows/qe-image.yml (1 hunks)
  • .github/workflows/test-okd-bundle.yml (1 hunks)
  • .github/workflows/verify-devcontainer.yml (1 hunks)
  • .github/workflows/windows-artifacts.yml (1 hunks)
  • .github/workflows/windows-chocolatey.yml (1 hunks)
  • Makefile (1 hunks)
  • go.mod (1 hunks)
  • images/build-e2e/Containerfile (1 hunks)
  • images/build-integration/Containerfile (1 hunks)
  • images/build/Dockerfile (1 hunks)
  • images/openshift-ci/Dockerfile (1 hunks)
  • tools/go.mod (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • go.mod
  • Makefile
🚧 Files skipped from review as they are similar to previous changes (3)
  • .devcontainer/devcontainer.json
  • .github/workflows/verify-devcontainer.yml
  • images/build-integration/Containerfile
🧰 Additional context used
🪛 Hadolint (2.12.0)
images/build/Dockerfile

[error] 2-2: MAINTAINER is deprecated

(DL4000)

⏰ 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). (17)
  • GitHub Check: build (ubuntu-22.04, 1.24)
  • GitHub Check: Run OKD bundle with crc (1.24)
  • GitHub Check: build (macOS-13, 1.24)
  • GitHub Check: build (macOS-14, 1.24)
  • GitHub Check: build (ubuntu-latest, 1.24)
  • GitHub Check: build (windows-2022, 1.24)
  • GitHub Check: build-qe (darwin, amd64)
  • GitHub Check: build (windows-2022, 1.24)
  • GitHub Check: build-qe (windows, amd64)
  • GitHub Check: build-qe (linux, amd64)
  • GitHub Check: build-qe (linux, arm64)
  • GitHub Check: build (macOS-14, 1.24)
  • GitHub Check: build-qe (darwin, arm64)
  • GitHub Check: build-installer (windows-2022, 1.24)
  • GitHub Check: verify-devcontainer
  • GitHub Check: build (ubuntu-latest, 1.24)
  • GitHub Check: Konflux kflux-prd-rh02 / crc-binary-on-pull-request
🔇 Additional comments (13)
.github/workflows/make-check-win.yml (1)

16-16: Go matrix bumped to 1.24 — looks good

Aligned with the repo-wide upgrade and supported by actions/setup-go@v5. No issues spotted.

.github/workflows/windows-artifacts.yml (1)

25-25: Installer job now targets Go 1.24 — OK

Consistent with other workflows and images; actions/setup-go@v5 will pull the latest 1.24.x.

.github/workflows/macos-installer.yml (1)

23-23: Go version updated to 1.24 — OK

MacOS installer builds will use Go 1.24 as intended. No action needed.

.github/workflows/make-check.yml (1)

19-19: Go 1.24 in CI matrix — OK

Matches the global toolchain bump; make goversioncheck on Linux should pass with this.

.github/workflows/test-okd-bundle.yml (1)

14-14: Go 1.24 Upgrade Confirmed

I ran the grep checks and found no remaining references to Go 1.23 or old rhel-8-release-golang tags. The workflow matrix and builder images now consistently use rhel-9/golang-1.24, and setup-go@v5 supports this version. Changes look good—approving the bump.

.github/workflows/qe-image.yml (1)

15-15: Go 1.24 bump is consistent with the rest of the repo.

Matrix and setup-go usage are correct. No additional changes needed here.

.github/workflows/make-rpm.yml (1)

16-16: LGTM: Go 1.24 in the matrix.

Matches Makefile/go.mod updates and the rhel-9 builder images elsewhere. setup-go@v5 will fetch the correct toolchain.

.github/workflows/choco-release.yml (1)

16-16: Go 1.24 bump approved.

Windows-2022 runner with setup-go@v5 will provision Go 1.24 correctly; no further changes needed.

.github/workflows/windows-chocolatey.yml (1)

16-16: Matrix update to Go 1.24 looks correct.

Consistent with the repo-wide version bump and tooling.

images/build/Dockerfile (2)

9-9: LGTM on the final COPY.

Copying the build outputs from the builder stage to UBI9 remains correct.


1-1: No residual RHEL8 or Go 1.23 references detected
Ran ripgrep across the repository for rhel-8-release-golang, golang-1.23, go 1.23, and GOVERSION 1.23—no matches found. The Dockerfile’s builder image (rhel-9-release-golang-1.24-openshift-4.20) is consistent.

images/build-e2e/Containerfile (1)

2-2: Builder base image bump is consistent with the repo-wide upgrade.

This keeps the e2e build aligned with Go 1.24. No issues spotted with the stage name or downstream COPYs.

images/openshift-ci/Dockerfile (1)

4-4: Builder base image bump to rhel-9/go1.24 is good and matches the UBI9 runtime stage.

Nice alignment; the artifacts copied later (linux/windows binaries and tests) remain unaffected by this change.

Copy link

openshift-ci bot commented Aug 20, 2025

@praveenkumar: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security ad0ce65 link false /test security
ci/prow/e2e-crc ad0ce65 link true /test e2e-crc

Full PR test history. Your PR dashboard.

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.

Copy link

openshift-ci bot commented Aug 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anjannath

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

The pull request process is described here

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

@anjannath anjannath merged commit 828bd04 into crc-org:main Aug 25, 2025
30 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants