Skip to content

[SANDBOX-1702] Upgrade to OCP 4.21#1250

Open
metlos wants to merge 4 commits intocodeready-toolchain:masterfrom
metlos:upgrade-ocp-4.21
Open

[SANDBOX-1702] Upgrade to OCP 4.21#1250
metlos wants to merge 4 commits intocodeready-toolchain:masterfrom
metlos:upgrade-ocp-4.21

Conversation

@metlos
Copy link
Contributor

@metlos metlos commented Mar 18, 2026

Related PRs:

Summary by CodeRabbit

  • Chores

    • Updated Kubernetes and controller dependencies to v0.34.1 and newer versions of related libraries.
    • Updated Prometheus client and OpenTelemetry components.
    • Updated Kubebuilder controller-gen version across CRD configurations.
  • Tests

    • Updated test expectations to reflect API validation error message format changes.

metlos and others added 4 commits March 11, 2026 16:24
Update openshift/api to release-4.21, openshift/library-go to release-4.21,
k8s.io dependencies to v0.34.3, and controller-runtime to v0.22.5.

Fix test assertion for changed k8s validation error message format that now
includes the resource type in the error string.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci openshift-ci bot requested review from mfrancisc and xcoulon March 18, 2026 12:48
@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

Walkthrough

This change updates Kubebuilder controller-gen version annotations in CRD manifests from v0.18.0 to v0.19.0, adjusts a test error message expectation, and bumps multiple Go module dependencies to newer versions including Kubernetes libraries and OpenShift releases, with replace directives redirecting codeready-toolchain modules to metlos alternatives.

Changes

Cohort / File(s) Summary
CRD Version Annotations
config/crd/bases/toolchain.dev.openshift.com_*.yaml
Updated controller-gen.kubebuilder.io/version annotation from v0.18.0 to v0.19.0 across 16 CRD manifest files (bannedusers, masteruserrecords, notifications, nstemplatetiers, proxyplugins, socialevents, spacebindingrequests, spacebindings, spaceprovisionerconfigs, spacerequests, spaces, tiertemplaterevisions, tiertemplates, toolchainclusters, toolchainconfigs, toolchainstatuses, usersignups, usertiers). No structural or behavioral changes.
Test Assertion Update
controllers/usersignup/status_updater_test.go
Updated test expectation to include the full API resource type (UserSignup.toolchain.dev.openshift.com) in error message validation rather than the abbreviated form.
Dependency Updates
go.mod
Bumped multiple module versions: k8s.io packages to v0.34.1, prometheus client\_golang to v1.23.2, openshift/api and openshift/library-go to release-4.21 equivalents, controller-runtime and controller-tools to newer releases, and logr to v1.4.3. Introduced replace directives remapping github.com/codeready-toolchain/api and github.com/codeready-toolchain/toolchain-common to metlos alternatives.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[SANDBOX-1702] Upgrade to OCP 4.21' accurately reflects the main purpose of the PR, which is upgrading dependencies to OpenShift Container Platform 4.21.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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

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

@sonarqubecloud
Copy link

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

🤖 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`:
- Around line 160-162: Remove the two replace directives that point
github.com/codeready-toolchain/api and
github.com/codeready-toolchain/toolchain-common to your personal fork
(github.com/metlos/*); specifically delete the replace lines referencing
github.com/metlos/api and github.com/metlos/toolchain-common from go.mod so the
project uses the upstream modules again, and if the fork is required only for
temporary local development, move those replaces into a local branch or
developer-specific go.mod/go.work and add a comment or README entry describing
the temporary nature and cleanup plan.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 622badbb-6de9-47e6-b574-d8021dc2183e

📥 Commits

Reviewing files that changed from the base of the PR and between 4ff1ff9 and bc31e34.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (20)
  • config/crd/bases/toolchain.dev.openshift.com_bannedusers.yaml
  • config/crd/bases/toolchain.dev.openshift.com_masteruserrecords.yaml
  • config/crd/bases/toolchain.dev.openshift.com_notifications.yaml
  • config/crd/bases/toolchain.dev.openshift.com_nstemplatetiers.yaml
  • config/crd/bases/toolchain.dev.openshift.com_proxyplugins.yaml
  • config/crd/bases/toolchain.dev.openshift.com_socialevents.yaml
  • config/crd/bases/toolchain.dev.openshift.com_spacebindingrequests.yaml
  • config/crd/bases/toolchain.dev.openshift.com_spacebindings.yaml
  • config/crd/bases/toolchain.dev.openshift.com_spaceprovisionerconfigs.yaml
  • config/crd/bases/toolchain.dev.openshift.com_spacerequests.yaml
  • config/crd/bases/toolchain.dev.openshift.com_spaces.yaml
  • config/crd/bases/toolchain.dev.openshift.com_tiertemplaterevisions.yaml
  • config/crd/bases/toolchain.dev.openshift.com_tiertemplates.yaml
  • config/crd/bases/toolchain.dev.openshift.com_toolchainclusters.yaml
  • config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml
  • config/crd/bases/toolchain.dev.openshift.com_toolchainstatuses.yaml
  • config/crd/bases/toolchain.dev.openshift.com_usersignups.yaml
  • config/crd/bases/toolchain.dev.openshift.com_usertiers.yaml
  • controllers/usersignup/status_updater_test.go
  • go.mod

Comment on lines +160 to +162
replace github.com/codeready-toolchain/api => github.com/metlos/api v0.0.0-20260318102359-237e681a639a

replace github.com/codeready-toolchain/toolchain-common => github.com/metlos/toolchain-common v0.0.0-20260318113116-fbd4bba9beb1
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify fork replacements and whether they are documented as temporary.
set -euo pipefail

echo "== Active replace directives in go.mod =="
rg -n '^\s*replace\s+github\.com/codeready-toolchain/(api|toolchain-common)\s*=>\s*github\.com/metlos/' go.mod

echo
echo "== Any other metlos module pinning in go.mod/go.sum =="
rg -n 'github\.com/metlos/(api|toolchain-common)' go.mod go.sum

echo
echo "== Documentation mentioning temporary fork overrides =="
rg -n 'metlos/(api|toolchain-common)|replace github\.com/codeready-toolchain/(api|toolchain-common)|temporary replace' -g '*.md'

Repository: codeready-toolchain/host-operator

Length of output: 1395


Remove personal fork overrides from root go.mod.

Lines 160 and 162 redirect core modules to github.com/metlos/* without documentation of temporary status or cleanup plan. This changes the dependency trust boundary and can hide upstream integration regressions. Fork overrides belong in local development environments or feature branches with explicit cleanup guidance, not in merged code.

Suggested fix
-replace github.com/codeready-toolchain/api => github.com/metlos/api v0.0.0-20260318102359-237e681a639a
-
-replace github.com/codeready-toolchain/toolchain-common => github.com/metlos/toolchain-common v0.0.0-20260318113116-fbd4bba9beb1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
replace github.com/codeready-toolchain/api => github.com/metlos/api v0.0.0-20260318102359-237e681a639a
replace github.com/codeready-toolchain/toolchain-common => github.com/metlos/toolchain-common v0.0.0-20260318113116-fbd4bba9beb1
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` around lines 160 - 162, Remove the two replace directives that point
github.com/codeready-toolchain/api and
github.com/codeready-toolchain/toolchain-common to your personal fork
(github.com/metlos/*); specifically delete the replace lines referencing
github.com/metlos/api and github.com/metlos/toolchain-common from go.mod so the
project uses the upstream modules again, and if the fork is required only for
temporary local development, move those replaces into a local branch or
developer-specific go.mod/go.work and add a comment or README entry describing
the temporary nature and cleanup plan.

@openshift-ci
Copy link

openshift-ci bot commented Mar 18, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeykazakov, MatousJobanek, metlos

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:
  • OWNERS [MatousJobanek,alexeykazakov,metlos]

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

@metlos
Copy link
Contributor Author

metlos commented Mar 18, 2026

/retest

@openshift-ci
Copy link

openshift-ci bot commented Mar 18, 2026

@metlos: The following test 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/e2e bc31e34 link true /test e2e

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.

@openshift-ci
Copy link

openshift-ci bot commented Mar 19, 2026

PR needs rebase.

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants