Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: rhel-9-release-golang-1.26-openshift-5.0
tag: rhel-9-release-golang-1.25-openshift-5.0
Comment on lines 1 to +4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check the Go version in the Dockerfile builder stage

rg -n 'FROM.*builder.*golang-' Dockerfile

Repository: openshift/cluster-cloud-controller-manager-operator

Length of output: 184


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the build_root_image block in .ci-operator.yaml
echo "---- .ci-operator.yaml (build_root_image) ----"
rg -n "build_root_image" .ci-operator.yaml || true
sed -n '1,120p' .ci-operator.yaml | cat -n

# Confirm which Dockerfile and which Go builder images are referenced
echo "---- Dockerfile builder Go references ----"
ls -la Dockerfile* || true
rg -n "FROM.*(golang-|builder:|builder)" Dockerfile* 2>/dev/null || true

echo "---- Dockerfile Go tag occurrences ----"
rg -n "golang-1\.2[56]-openshift-5\.0" Dockerfile* 2>/dev/null || true
rg -n "golang-1\.25|golang-1\.26" Dockerfile* 2>/dev/null || true

# Also check for any other Dockerfiles (rare) that might matter
echo "---- Other Dockerfile files (if any) ----"
fd -g "Dockerfile*" . || true

Repository: openshift/cluster-cloud-controller-manager-operator

Length of output: 1234


Critical: Align Go toolchain version between .ci-operator.yaml and Dockerfile builder stage

.ci-operator.yaml sets build_root_image.tag to rhel-9-release-golang-1.25-openshift-5.0, but the Dockerfile builder stage still uses registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0, creating a CI/toolchain mismatch.

🔧 Suggested alignment
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-5.0 AS builder
🤖 Prompt for 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.

In @.ci-operator.yaml around lines 1 - 4, The CI config sets
build_root_image.tag to rhel-9-release-golang-1.25-openshift-5.0 but the
Dockerfile still uses
registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 in the
builder FROM line; update the Dockerfile builder stage to use the golang-1.25
image (e.g.,
registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-5.0) so the
Dockerfile's FROM matches build_root_image.tag and the Go toolchain is
consistent across CI and the build image.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN make build &&\
gzip /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/openshift-tests/bin/cloud-controller-manager-aws-tests-ext &&\
gzip /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/openshift-tests/bin/cloud-controller-manager-operator-tests-ext

FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
FROM registry.ci.openshift.org/ocp/5.0:base-rhel9
COPY --from=builder /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/bin/cluster-controller-manager-operator .
COPY --from=builder /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/bin/config-sync-controllers .
COPY --from=builder /go/src/github.com/openshift/cluster-cloud-controller-manager-operator/bin/azure-config-credentials-injector .
Expand Down