[SANDBOX-1700] chore: upgrade to OCP 4.21 dependencies#501
[SANDBOX-1700] chore: upgrade to OCP 4.21 dependencies#501metlos wants to merge 5 commits intocodeready-toolchain:masterfrom
Conversation
Update openshift/api to release-4.21, k8s.io deps to v0.34.1, controller-runtime to v0.22.0, and controller-tools to v0.19.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughUpdated Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
go.mod (1)
3-5:⚠️ Potential issue | 🟡 MinorDocument the toolchain version intent if it diverges from CI expectations.
The
go 1.24.4declaration will be used by CI workflows (actions/setup-goreads thegodirective), while thetoolchain go1.24.13suggestion only applies locally if toolchain auto-selection is enabled. This creates a potential build environment inconsistency: developers may build and test with Go 1.24.13 while CI validates with Go 1.24.4. If this is intentional for reproducibility/standardization, document it; if unintentional, align the versions.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@go.mod` around lines 3 - 5, The go.mod declares "go 1.24.4" while the toolchain line is "toolchain go1.24.13", causing CI vs local toolchain mismatch; either make them identical (update "go 1.24.4" to "go 1.24.13" or change "toolchain go1.24.13" to match 1.24.4) or add a short comment in the repo README or a new TOOLCHAIN.md explaining the intentional divergence and which version CI (go directive) and local toolchain (toolchain directive) should use; update the go.mod and documentation consistently and mention the authoritative source (CI uses the go directive).
🧹 Nitpick comments (1)
go.mod (1)
9-10: Update the OpenShift branch comment to match the actual upgrade target.The inline comment says
release-4.20while this PR upgrades to OCP 4.21 and bumpsgithub.com/openshift/apiaccordingly. Keeping this stale comment will mislead future dependency updates.As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@go.mod` around lines 9 - 10, Update the inline comment above the github.com/openshift/api dependency in go.mod so it reflects the actual target branch release-4.21 (instead of stale release-4.20) to match the bumped dependency version; locate the comment near the github.com/openshift/api v0.0.0-20260304172252-b0658d22beea entry and change the branch name text to release-4.21.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@go.mod`:
- Around line 3-5: The go.mod declares "go 1.24.4" while the toolchain line is
"toolchain go1.24.13", causing CI vs local toolchain mismatch; either make them
identical (update "go 1.24.4" to "go 1.24.13" or change "toolchain go1.24.13" to
match 1.24.4) or add a short comment in the repo README or a new TOOLCHAIN.md
explaining the intentional divergence and which version CI (go directive) and
local toolchain (toolchain directive) should use; update the go.mod and
documentation consistently and mention the authoritative source (CI uses the go
directive).
---
Nitpick comments:
In `@go.mod`:
- Around line 9-10: Update the inline comment above the github.com/openshift/api
dependency in go.mod so it reflects the actual target branch release-4.21
(instead of stale release-4.20) to match the bumped dependency version; locate
the comment near the github.com/openshift/api v0.0.0-20260304172252-b0658d22beea
entry and change the branch name text to release-4.21.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d0eebf58-f13f-4c9d-95ae-d5753bc60056
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (1)
go.mod
| @@ -7,54 +7,56 @@ toolchain go1.24.13 | |||
| require ( | |||
| github.com/go-bindata/go-bindata v3.1.2+incompatible | |||
| // using latest commit from 'github.com/openshift/api branch release-4.20' | |||
There was a problem hiding this comment.
| // using latest commit from 'github.com/openshift/api branch release-4.20' | |
| // using latest commit from 'github.com/openshift/api branch release-4.21' |
…n toolchain-common
| sigs.k8s.io/controller-runtime v0.21.0 | ||
| sigs.k8s.io/controller-tools v0.18.0 | ||
| k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b | ||
| sigs.k8s.io/controller-runtime v0.22.1 |
There was a problem hiding this comment.
How did you "pick" this version? (Asking for learning purposes, I usually align with operator-sdk)
The 0.22.x causes different kinds of problems with SSA in the fake client that are not worth upgrading to.
…re all the other remnants were coming from
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@go.mod`:
- Line 13: The go.mod currently pins k8s.io/code-generator to v0.33.4 which is
incompatible with k8s.io/api and k8s.io/apimachinery at v0.34.1; update the
module requirement for k8s.io/code-generator to v0.34.1 in go.mod (replace the
existing k8s.io/code-generator v0.33.4 entry with v0.34.1), then run go mod tidy
and regenerate any code (deepcopy/client/informer) that depends on the
code-generator to ensure all Kubernetes staging repos use the matching v0.34.1
version.
- Line 60: go.mod currently pulls sigs.k8s.io/structured-merge-diff/v6@v6.3.0
which is incompatible with sigs.k8s.io/controller-runtime@v0.21.0 (which expects
structured-merge-diff v4.x); fix by making versions consistent: either pin
sigs.k8s.io/structured-merge-diff to the v4 series expected by
controller-runtime (e.g., v4.6.0) or upgrade sigs.k8s.io/controller-runtime to a
release that explicitly supports structured-merge-diff v6, then run `go mod
tidy` and `go test` to verify no API breakage (refer to the module names
sigs.k8s.io/structured-merge-diff/v6 and sigs.k8s.io/controller-runtime in the
diff).
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 521c0272-792e-40fe-8c1a-2cb534a41b21
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (1)
go.mod
|
|
Postponed until operator-sdk is upgradable, too. |



Update openshift/api to release-4.21, k8s.io deps to v0.34.1, controller-runtime to v0.22.0, and controller-tools to v0.19.0.
https://redhat.atlassian.net/browse/SANDBOX-1700
Checks
Did you run
make generatetarget? noThis would only change
controller-gen.kubebuilder.io/versionannotation to from0.18.0to0.19.0. No actual changes to the CRDs.Did
make generatechange anything in other projects (host-operator, member-operator)? noSee above
Summary by CodeRabbit