[release-4.21] Fix isNoOLMFeatureGateEnabled to check only the current cluster version#31331
Conversation
The FeatureGate CR status.featureGates contains entries for each cluster version. After an upgrade, entries for both the old and new versions exist. isNoOLMFeatureGateEnabled was iterating all version entries, so it could incorrectly return true by finding the gate enabled in a pre-upgrade version's entry, even though the current version has it disabled. This caused the e2e-upgrade-out-of-change test to fail because it expected a sail finalizer that the CIO had already removed during the downgrade path. Fix this by looking up the current cluster version from ClusterVersion status.desired.version and only checking the matching featureGates entry. https://redhat.atlassian.net/browse/OCPBUGS-91956 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gcs278 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Using the cherry-pick command just to be clean |
|
@gcs278: Closed this PR. DetailsIn response to this:
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. |
Summary
isNoOLMFeatureGateEnabledwas iterating all version entries instatus.featureGates, which after an upgrade includes entries for both old and new cluster versionstrueby findingGatewayAPIWithoutOLMenabled in the pre-upgrade version's entry, even when the current version has it disabledClusterVersion.status.desired.versionand only check the matchingfeatureGatesentrye2e-upgrade-out-of-changetest failure for [release-4.21] OCPBUGS-88295, OCPBUGS-88297, OCPBUGS-82146, OCPBUGS-78330, OCPBUGS-85550: NE-2480: Promote GatewayAPIWithoutOLM feature gate to Default api#2865 where the test expected a sail finalizer that the CIO had already removed during the downgrade path🤖 Generated with Claude Code