Skip to content

OCPBUGS-104846: Filter both [FeatureGate:] and [OCPFeatureGate:] - #31623

Open
jsafrane wants to merge 1 commit into
openshift:mainfrom
jsafrane:filter-featuregate
Open

OCPBUGS-104846: Filter both [FeatureGate:] and [OCPFeatureGate:]#31623
jsafrane wants to merge 1 commit into
openshift:mainfrom
jsafrane:filter-featuregate

Conversation

@jsafrane

@jsafrane jsafrane commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Now that openshift-tests read real feature gates enabled in the cluster from the API server, it should be safe to filter all tests by [FeatureGate:]

CSI certification tests have code in openshift/origin (vendor/k8s.io/kubernetes/test/e2e/storage/testsuites) and it needs to be filtered with [FeatureGate:.

I'm going to compare nr. of tests + test names from AWS payload jobs with and without this PR to make sure nothing gets lost or added unexpectedly.

Summary by CodeRabbit

  • Bug Fixes

    • Feature-gate labels now support both standard and OCP-prefixed formats while preserving gate-name matching.
    • Cluster-state filtering correctly handles enabled, disabled, unknown, multiple, and mixed feature-gate labels.
  • Tests

    • Added coverage for feature-gate filtering across supported label formats and configuration states.

Now that openshift-tests read real feature gates enabled in the cluster
from the API server, it should be safe to filter all tests by
[FeatureGate:]

CSI certification tests have code in openshift/origin
(vendor/k8s.io/kubernetes/test/e2e/storage/testsuites) and it needs to be
filtered with `[FeatureGate:`.
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Sep 9, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jsafrane: This pull request references Jira Issue OCPBUGS-104846, which is valid.

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

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

Details

In response to this:

Now that openshift-tests read real feature gates enabled in the cluster from the API server, it should be safe to filter all tests by [FeatureGate:]

CSI certification tests have code in openshift/origin (vendor/k8s.io/kubernetes/test/e2e/storage/testsuites) and it needs to be filtered with [FeatureGate:.

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.

@coderabbitai

coderabbitai Bot commented Sep 9, 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: ca0424aa-9cd1-4678-a847-bce9bac34572

📥 Commits

Reviewing files that changed from the base of the PR and between 5540cb9 and e1fd60d.

📒 Files selected for processing (2)
  • pkg/test/filters/cluster_state.go
  • pkg/test/filters/cluster_state_test.go

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

The cluster-state feature-gate matcher now accepts both [FeatureGate:...] and [OCPFeatureGate:...] labels. New table-driven tests cover enabled, disabled, unknown, multiple, and mixed labels.

Changes

Feature-gate filtering

Layer / File(s) Summary
Feature-gate matching and coverage
pkg/test/filters/cluster_state.go, pkg/test/filters/cluster_state_test.go
The regular expression accepts both feature-gate label prefixes. Tests validate filtering for enabled, disabled, unknown, multiple, and mixed feature-gate labels.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to e1fd6

Feature-gate test filtering now recognizes both standard and OCP-prefixed annotations, allowing applicable tests to be selected consistently. The change is covered by targeted cases and has no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 14 | ❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
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 PASS. The pull request adds the static Go test TestClusterStateFilterFeatureGateTags and static subtest titles such as upstream enabled gate and mixed gate tags with disabled gate. The feature-g…
Test Structure And Quality ✅ Passed PASS. The added test is a standard Go table-driven unit test, not Ginkgo code. Each subtest checks one feature-gate filtering case. It creates only in-memory test specifications, so no resource cleanu…
Microshift Test Compatibility ✅ Passed PASS — The pull request adds a standard Go unit test, TestClusterStateFilterFeatureGateTags, using testing.T and t.Run. It does not add Ginkgo e2e tests (It, Describe, Context, or When).…
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS. The pull request adds TestClusterStateFilterFeatureGateTags, a standard testing.T unit test in pkg/test/filters/cluster_state_test.go. It does not add Ginkgo It, Describe, Context, o…
Topology-Aware Scheduling Compatibility ✅ Passed The check is not applicable. The pull request changes only a test-filter regular expression in pkg/test/filters/cluster_state.go and adds unit tests in pkg/test/filters/cluster_state_test.go. The …
Ote Binary Stdout Contract ✅ Passed The pull request changes only a regex initializer and adds a unit test. The changed code contains no stdout writes, klog usage, suite setup, TestMain, init function, or logging configuration change. T…
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The pull request adds a standard Go unit test, TestClusterStateFilterFeatureGateTags, not a new Ginkgo e2e test. The changed code contains no IPv4 addresses, IP parsing, network URLs, external hosts…
No-Weak-Crypto ✅ Passed The pull request changes only feature-gate label matching and adds filter tests. The added code contains no MD5, SHA1, DES, 3DES, RC4, Blowfish, or ECB usage, custom cryptography, or secret/token comp…
Container-Privileges ✅ Passed The pull request changes only a Go regular expression and adds unit tests. The exact diff contains no container or Kubernetes manifest changes and no privilege-related settings such as `privileged: tr…
No-Sensitive-Data-In-Logs ✅ Passed The pull request adds no logging code and introduces no sensitive-data literals or sources. The only production change is the feature-gate regex. Existing log statements are identical to the parent re…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: filtering both [FeatureGate:] and [OCPFeatureGate:] annotations.
  • Fix all pre-merge checks with AI
✨ 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 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@openshift-ci
openshift-ci Bot requested review from deads2k and sjenning September 9, 2026 09:24
@openshift-ci openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Sep 9, 2026
@jsafrane

jsafrane commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/payload-test periodic-ci-openshift-release-main-ci-5.1-e2e-aws-ovn-techpreview periodic-ci-openshift-release-main-ci-5.1-e2e-aws-ovn periodic-ci-openshift-release-main-nightly-5.1-e2e-aws-csi periodic-ci-openshift-release-main-nightly-5.1-e2e-aws-ovn-serial periodic-ci-openshift-release-main-ci-5.1-e2e-aws-ovn-techpreview-serial

@openshift-ci

openshift-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@jsafrane: it appears that you have attempted to use some version of the payload command, but your comment was incorrectly formatted and cannot be acted upon. See the docs for usage info.

@jsafrane

jsafrane commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-release-main-ci-5.1-e2e-aws-ovn-techpreview periodic-ci-openshift-release-main-ci-5.1-e2e-aws-ovn periodic-ci-openshift-release-main-nightly-5.1-e2e-aws-csi periodic-ci-openshift-release-main-nightly-5.1-e2e-aws-ovn-serial periodic-ci-openshift-release-main-ci-5.1-e2e-aws-ovn-techpreview-serial

@openshift-ci

openshift-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@jsafrane: trigger 8 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-5.1-e2e-aws-ovn-techpreview
  • periodic-ci-openshift-release-main-ci-5.1-e2e-aws-ovn
  • periodic-ci-openshift-release-main-nightly-5.1-e2e-aws-csi
  • periodic-ci-openshift-release-main-nightly-5.1-e2e-aws-ovn-serial-1of2
  • periodic-ci-openshift-release-main-nightly-5.1-e2e-aws-ovn-serial-2of2
  • periodic-ci-openshift-release-main-ci-5.1-e2e-aws-ovn-techpreview-serial-1of3
  • periodic-ci-openshift-release-main-ci-5.1-e2e-aws-ovn-techpreview-serial-2of3
  • periodic-ci-openshift-release-main-ci-5.1-e2e-aws-ovn-techpreview-serial-3of3

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/2e603cf0-ac31-11f1-84a2-62197d2d5835-0

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/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-ovn

@openshift-ci

openshift-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@jsafrane: 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-vsphere-ovn e1fd60d link true /test e2e-vsphere-ovn

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.

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

Labels

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. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants