Skip to content

OCPBUGS-91956: Fix isNoOLMFeatureGateEnabled to check only the current cluster version#31329

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
gcs278:fix-isNoOLMFeatureGateEnabled-version
Jun 24, 2026
Merged

OCPBUGS-91956: Fix isNoOLMFeatureGateEnabled to check only the current cluster version#31329
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
gcs278:fix-isNoOLMFeatureGateEnabled-version

Conversation

@gcs278

@gcs278 gcs278 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Corrected feature gate validation for Gateway API to properly check against your cluster's current OpenShift version. Previously, the feature would activate if enabled for any version; now it only activates when explicitly enabled for your specific version. This ensures appropriate feature availability based on your cluster configuration.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 23, 2026
@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 8ed2b53e-d888-47f3-a677-a05647e6c711

📥 Commits

Reviewing files that changed from the base of the PR and between a2cb43f and 8039855.

📒 Files selected for processing (1)
  • test/extended/router/gatewayapicontroller.go

Walkthrough

isNoOLMFeatureGateEnabled in the gateway API controller test file is updated to fetch the cluster's current ClusterVersion and restrict the GatewayAPIWithoutOLM feature gate check to the feature gate entry whose Version matches that current version, rather than returning true for any matching entry regardless of version.

Changes

Version-scoped GatewayAPIWithoutOLM feature gate check

Layer / File(s) Summary
Version-matched feature gate check
test/extended/router/gatewayapicontroller.go
isNoOLMFeatureGateEnabled now retrieves cv.Status.Desired.Version and iterates the cluster FeatureGates list to find the entry whose fg.Version matches that current version before checking the Enabled list for GatewayAPIWithoutOLM. Logging is updated to include the current version and report when the gate is not enabled for that specific version.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Single Node Openshift (Sno) Test Compatibility ⚠️ Warning 13 new Ginkgo e2e tests in gatewayapicontroller.go lack SNO compatibility guards. Tests assume LoadBalancer services and DNS management (unavailable on SNO) without [Skipped:SingleReplicaTopology]... Add [Skipped:SingleReplicaTopology] label to test names, or add SNO detection in shouldSkipGatewayAPITests() function using infrastructure.Status.ControlPlaneTopology check to skip on SingleReplicaTopologyMode.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the main change: fixing the isNoOLMFeatureGateEnabled function to check only the current cluster version instead of all version entries.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed All Ginkgo test titles in gatewayapicontroller.go are static and deterministic, with no dynamic values in test names. The PR changes only modify the isNoOLMFeatureGateEnabled helper function, not t...
Test Structure And Quality ✅ Passed The PR modifies a helper function (isNoOLMFeatureGateEnabled), not Ginkgo test code. The check is not applicable as no test blocks or test structure were altered.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests are added in this PR. Changes are limited to modifying the existing isNoOLMFeatureGateEnabled helper function; test count remains at 14 before/after. Check not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies test file test/extended/router/gatewayapicontroller.go, not deployment manifests, operator code, or controllers. No scheduling constraints or topology assumptions are introduced.
Ote Binary Stdout Contract ✅ Passed The PR modifies a test helper function called from BeforeEach() that uses e2e.Logf for test-level logging. No process-level stdout writes, klog misconfiguration, or other OTE binary stdout contract...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed New Gateway API e2e tests have IPv6 protection: all 13 tests skip on IPv6/dual-stack clusters via shouldSkipGatewayAPITests(). No IPv4 literals, external connectivity, or hardcoded IPs found. URL u...
No-Weak-Crypto ✅ Passed PR modifies feature gate checking logic in test code. No weak crypto patterns (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB) or insecure comparisons found; only standard version string comparisons used.
Container-Privileges ✅ Passed PR modifies only a Go test file with logic changes; contains no container manifests, Kubernetes security specs, or privileged configurations.
No-Sensitive-Data-In-Logs ✅ Passed The logging statements added log only the feature gate name and cluster version string, neither of which exposes sensitive data like passwords, tokens, API keys, PII, session IDs, internal hostname...

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2026
@gcs278 gcs278 changed the title Fix isNoOLMFeatureGateEnabled to check only the current cluster version OCPBUGS-91956: Fix isNoOLMFeatureGateEnabled to check only the current cluster version Jun 23, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 23, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@gcs278: This pull request references Jira Issue OCPBUGS-91956, which is invalid:

  • expected the bug to target either version "4.21." or "openshift-4.21.", but it targets "5.0.0" instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-91956 to depend on a bug targeting a version in 4.22.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

Test plan

🤖 Generated with Claude Code

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.

@gcs278 gcs278 marked this pull request as ready for review June 23, 2026 19:39
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 23, 2026
@gcs278

gcs278 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

/refresh jira

@openshift-ci openshift-ci Bot requested review from Thealisyed and miheer June 23, 2026 19:39
@gcs278 gcs278 force-pushed the fix-isNoOLMFeatureGateEnabled-version branch from f3111e3 to 99a9553 Compare June 23, 2026 19:40
@gcs278

gcs278 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown

@gcs278: This pull request references Jira Issue OCPBUGS-91956, which is invalid:

  • expected the bug to target either version "4.21." or "openshift-4.21.", but it targets "5.0.0" instead
  • expected Jira Issue OCPBUGS-91956 to depend on a bug targeting a version in 4.22.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@gcs278 gcs278 changed the base branch from release-4.21 to main June 23, 2026 19:41
@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 23, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@gcs278: This pull request references Jira Issue OCPBUGS-91956, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @melvinjoseph86

Details

In response to this:

Summary

Test plan

🤖 Generated with Claude Code

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.

@openshift-ci openshift-ci Bot requested a review from melvinjoseph86 June 23, 2026 19:41
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.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gcs278 gcs278 force-pushed the fix-isNoOLMFeatureGateEnabled-version branch from 99a9553 to 8039855 Compare June 23, 2026 19:44
@openshift-ci-robot

Copy link
Copy Markdown

@gcs278: This pull request references Jira Issue OCPBUGS-91956, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @melvinjoseph86

Details

In response to this:

Summary

🤖 Generated with Claude Code

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.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@rikatz

rikatz commented Jun 23, 2026

Copy link
Copy Markdown
Member

/lgtm
thanks

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 23, 2026
@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gcs278, rikatz

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:

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

@gcs278

gcs278 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Unrelated failures
/retest

@gcs278

gcs278 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

This is a CI-only fix to have no impact on any jobs in the main branch. Self verifying as I see CI passing and I know this is a low-risk test-only change. Additionally, this passing job: https://github.com/openshift/api/pull/2865/checks?check_run_id=83048976046 shows that the fix here is fixing the upgrade-out-of-change CI job as we intend.

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jun 23, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@gcs278: This PR has been marked as verified by CI.

Details

In response to this:

This is a CI-only fix to have no impact on any jobs in the main branch. Self verifying as I see CI passing and I know this is a low-risk test-only change. Additionally, this passing job: https://github.com/openshift/api/pull/2865/checks?check_run_id=83048976046 shows that the fix here is fixing the upgrade-out-of-change CI job as we intend.

/verified by CI

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.

@gcs278

gcs278 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

/cherry-pick release-4.22 release-4.21

@openshift-cherrypick-robot

Copy link
Copy Markdown

@gcs278: once the present PR merges, I will cherry-pick it on top of release-4.22 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.22 release-4.21

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.

@gcs278

gcs278 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

unrelated failure
/test e2e-metal-ipi-ovn-ipv6

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD a2cb43f and 2 for PR HEAD 8039855 in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 88018a6 and 1 for PR HEAD 8039855 in total

@gcs278

gcs278 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

infra issue
/test e2e-aws-ovn-fips

@gcs278

gcs278 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

fips is very flake - looks like different flakes each time
/test e2e-aws-ovn-fips

@sosiouxme

Copy link
Copy Markdown
Member

/override ci/prow/e2e-aws-ovn-fips
on recognizance of PR owner and a day of complete failures for all PRs

@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@sosiouxme: Overrode contexts on behalf of sosiouxme: ci/prow/e2e-aws-ovn-fips

Details

In response to this:

/override ci/prow/e2e-aws-ovn-fips
on recognizance of PR owner and a day of complete failures for all PRs

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.

@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@gcs278: all tests passed!

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-merge-bot openshift-merge-bot Bot merged commit 0bc62f3 into openshift:main Jun 24, 2026
21 checks passed
@openshift-ci-robot

Copy link
Copy Markdown

@gcs278: Jira Issue Verification Checks: Jira Issue OCPBUGS-91956
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-91956 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

Summary

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
  • Corrected feature gate validation for Gateway API to properly check against your cluster's current OpenShift version. Previously, the feature would activate if enabled for any version; now it only activates when explicitly enabled for your specific version. This ensures appropriate feature availability based on your cluster configuration.

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.

@openshift-cherrypick-robot

Copy link
Copy Markdown

@gcs278: new pull request created: #31338

Details

In response to this:

/cherry-pick release-4.22 release-4.21

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.

@openshift-merge-robot

Copy link
Copy Markdown
Contributor

Fix included in release 5.0.0-0.nightly-2026-06-25-122140

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants