Skip to content

Conversation

wking
Copy link
Member

@wking wking commented Oct 6, 2025

Explicitly name the next OpenShift version, to reduce the chances that cluster administrators think the message applies to a currently in-progress update, when Upgradeable is only talking about future updates.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 6, 2025
@openshift-ci-robot
Copy link

@wking: This pull request explicitly references no jira issue.

In response to this:

Explicitly name the next OpenShift version, to reduce the chances that cluster administrators think the message applies to a currently in-progress update, when Upgradeable is only talking about future updates.

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 openshift-eng/jira-lifecycle-plugin repository.

Copy link

coderabbitai bot commented Oct 6, 2025

Walkthrough

Adds a nextOpenShiftVersion field to the kubelet version skew controller, initializes it in the constructor, and updates all upgrade-related messages and condition strings to include the explicit next OpenShift minor version. Test expectations are updated to match the new message format.

Changes

Cohort / File(s) Summary of changes
Controller logic
pkg/operator/kubeletversionskewcontroller/kubelet_version_skew_controller.go
Introduced nextOpenShiftVersion (semver.Version), set in NewKubeletVersionSkewController. Updated all upgrade-notification and condition messages to include %d.%d for the next OpenShift minor version across single-node, multi-node, and behind-API-server scenarios.
Tests
pkg/operator/kubeletversionskewcontroller/kubelet_version_skew_controller_test.go
Adjusted expected message strings to include explicit target OpenShift minor versions (e.g., “to 4.9”, “to 4.10”). No functional test logic changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title accurately summarizes the main change but includes unnecessary noise such as the “NO-ISSUE:” prefix and the full package path, making it longer and less concise than ideal. Please shorten the title to a single clear sentence without the “NO-ISSUE:” prefix or file path, for example: “Explicitly name next OpenShift version in skew message.”
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed The description clearly explains the rationale for naming the next OpenShift version in the skew message and directly relates to the changeset’s intent.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • 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

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

Copy link
Contributor

openshift-ci bot commented Oct 6, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wking
Once this PR has been reviewed and has the lgtm label, please assign sanchezl for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

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 (1)
pkg/operator/kubeletversionskewcontroller/kubelet_version_skew_controller_test.go (1)

147-156: Initialize the missing nextOpenShiftVersion field.

The test controller initialization is missing the nextOpenShiftVersion field that was added to the struct in kubelet_version_skew_controller.go. Without this field, the controller will use the zero value (0.0.0) and the test messages will show "to 0.0" instead of the expected version numbers, causing all affected tests to fail.

Apply this diff to add the missing field:

 			c := &kubeletVersionSkewController{
 				operatorClient: v1helpers.NewFakeStaticPodOperatorClient(
 					&operatorv1.StaticPodOperatorSpec{OperatorSpec: operatorv1.OperatorSpec{ManagementState: operatorv1.Managed}},
 					status, nil, nil,
 				),
 				nodeLister:                  corev1listers.NewNodeLister(indexer),
 				apiServerVersion:            semver.MustParse(apiServerVersion),
 				minSupportedSkew:            minSupportedKubeletSkewForOpenShiftVersion(ocpVersion),
 				minSupportedSkewNextVersion: minSupportedKubeletSkewForOpenShiftVersion(nextOpenShiftVersion),
+				nextOpenShiftVersion:        nextOpenShiftVersion,
 			}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 51e09bc and 4be403c.

📒 Files selected for processing (2)
  • pkg/operator/kubeletversionskewcontroller/kubelet_version_skew_controller.go (3 hunks)
  • pkg/operator/kubeletversionskewcontroller/kubelet_version_skew_controller_test.go (3 hunks)
🔇 Additional comments (6)
pkg/operator/kubeletversionskewcontroller/kubelet_version_skew_controller.go (5)

55-55: LGTM!

The computation of the next OpenShift version by incrementing the minor version is correct and straightforward.


62-62: LGTM!

The field initialization properly assigns the computed next OpenShift version to the controller.


89-89: LGTM!

The new field addition is appropriate for storing the next OpenShift version information.


186-190: LGTM!

The message formatting correctly includes the explicit next OpenShift version in all three cases (single node, 2-3 nodes, and many nodes), which aligns with the PR's objective to clarify that the Upgradeable status refers to future updates.


197-201: LGTM!

The message formatting correctly includes the explicit next OpenShift version in all three cases, making it clear which future upgrade the supportability statement refers to.

pkg/operator/kubeletversionskewcontroller/kubelet_version_skew_controller_test.go (1)

68-68: LGTM!

These test expectations correctly include the explicit next OpenShift version (4.9) in the upgrade messages, matching the updated format in the controller implementation.

Also applies to: 84-84, 92-92, 100-100

expectedStatus: operatorv1.ConditionTrue,
expectedReason: KubeletMinorVersionSupportedNextUpgradeReason,
expectedMsgLines: "Kubelet minor version (1.20.0) on node test000 is behind the expected API server version; nevertheless, it will continue to be supported in the next OpenShift minor version upgrade.",
expectedMsgLines: "Kubelet minor version (1.20.0) on node test000 is behind the expected API server version; nevertheless, it will continue to be supported in the next OpenShift minor version upgrade 4.10.",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix the missing "to" preposition.

The test expectation is missing "to" before "4.10". The actual message format in line 197 of kubelet_version_skew_controller.go includes "upgrade to %d.%d", so this test expectation should match.

Apply this diff to fix the test expectation:

-			expectedMsgLines: "Kubelet minor version (1.20.0) on node test000 is behind the expected API server version; nevertheless, it will continue to be supported in the next OpenShift minor version upgrade 4.10.",
+			expectedMsgLines: "Kubelet minor version (1.20.0) on node test000 is behind the expected API server version; nevertheless, it will continue to be supported in the next OpenShift minor version upgrade to 4.10.",
📝 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
expectedMsgLines: "Kubelet minor version (1.20.0) on node test000 is behind the expected API server version; nevertheless, it will continue to be supported in the next OpenShift minor version upgrade 4.10.",
expectedMsgLines: "Kubelet minor version (1.20.0) on node test000 is behind the expected API server version; nevertheless, it will continue to be supported in the next OpenShift minor version upgrade to 4.10.",
🤖 Prompt for AI Agents
In
pkg/operator/kubeletversionskewcontroller/kubelet_version_skew_controller_test.go
around line 124, the expected message string is missing the preposition "to"
before the OpenShift version; update the expectedMsgLines value to include "to"
so it matches the actual message format ("upgrade to %d.%d") used in
kubelet_version_skew_controller.go.

…rsion in skew message

Explicitly name the next OpenShift version, to reduce the chances that
cluster administrators think the message applies to a currently
in-progress update, when Upgradeable is only talking about future
updates.
Copy link
Contributor

openshift-ci bot commented Oct 6, 2025

@wking: 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/e2e-aws-operator-disruptive-single-node 4be403c link false /test e2e-aws-operator-disruptive-single-node
ci/prow/e2e-gcp-operator-single-node 4be403c link false /test e2e-gcp-operator-single-node
ci/prow/okd-scos-e2e-aws-ovn 4be403c link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-aws-ovn-upgrade 4be403c link true /test e2e-aws-ovn-upgrade
ci/prow/unit 4be403c link true /test unit

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants