Skip to content

OCPBUGS-100308: Fix test APIs for openshift.io must have stable versions - #31458

Open
sadasu wants to merge 1 commit into
openshift:mainfrom
sadasu:fix-crd-check
Open

OCPBUGS-100308: Fix test APIs for openshift.io must have stable versions#31458
sadasu wants to merge 1 commit into
openshift:mainfrom
sadasu:fix-crd-check

Conversation

@sadasu

@sadasu sadasu commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Check if a CRD's version is served before checking if it the stable version. Sometimes, the older unstable versions are not deleted rightaway but these CRDs are not served by default either. That should not cause this test to flag a failure.

Summary by CodeRabbit

  • Bug Fixes
    • Updated CRD version stability checks to ignore versions that are not served, preventing false failures from inactive version specifications.

@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
openshift-ci Bot requested review from bparees and sdodson July 30, 2026 18:52
Check if a CRD's version is served before checking if it the
stable version. Sometimes, the older unstable versions are not
deleted rightaway but these CRDs are not served by default either.
That should not cause this test to fail.
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Walkthrough

The CRD stability test now ignores unserved version specifications and checks stability only for served versions.

Changes

CRD version stability

Layer / File(s) Summary
Filter unserved CRD versions
test/extended/operators/crd_must_be_stable.go
The stability loop skips CRD versions with Served set to false before checking their stability.

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

Suggested reviewers: sdodson, bparees

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 The only Ginkgo title in the changed file is static (must have stable versions); the PR changes test logic, not test names.
Test Structure And Quality ✅ Passed PASS: The change only skips unserved CRD versions; the test stays a single focused It block with no resource cleanup or timeout issues and matches repo patterns.
Microshift Test Compatibility ✅ Passed Only an existing test body changed; no new Ginkgo specs or MicroShift-unsafe APIs/features were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The touched test only checks CRD version metadata and adds a Served guard; it makes no multi-node or HA assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed Only a CRD stability test changed; it now skips unserved versions and adds no topology, affinity, replica, or node-selector logic.
Ote Binary Stdout Contract ✅ Passed The changed test only skips unserved CRD versions; it adds no stdout writes in main/init/suite setup or top-level init code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo test was added; the existing CRD stability test only adds a Served check and contains no IPv4 or external connectivity assumptions.
No-Weak-Crypto ✅ Passed Only change is a served-flag guard in a CRD stability test; no crypto APIs, weak ciphers, or secret/token comparisons were introduced.
Container-Privileges ✅ Passed PR only updates a Go test; no changed file contains privileged container/K8s manifest settings.
No-Sensitive-Data-In-Logs ✅ Passed The patch only skips unserved CRD versions in a test; it adds no logging or sensitive-data output.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the change: it fixes the openshift.io stable-version test that now skips unserved CRD versions.
✨ 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 ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Jul 30, 2026
@sdodson

sdodson commented Jul 30, 2026

Copy link
Copy Markdown
Member

@sadasu Makes sense, lgtm, is there a bug that this is fixing?

@sadasu

sadasu commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@sadasu Makes sense, lgtm, is there a bug that this is fixing?

I haven't opend a bug for this yet. I opened this in response to the failure I was seeing in this PR : openshift/api#2859 and this run https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_api/2859/pull-ci-openshift-api-master-e2e-aws-ovn/2082842505988018176

@sdodson

sdodson commented Jul 30, 2026

Copy link
Copy Markdown
Member

/lgtm
/approve

Took a quick look to see if this is failing with any frequency, doesn't seem like that's the case so won't bother with a bug and backports

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

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sadasu, sdodson

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 30, 2026
@sadasu sadasu changed the title Fix APIs for openshift.io must have stable versions check OCPBUGS-100308: Fix test APIs for openshift.io must have stable versions Jul 30, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. 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 Jul 30, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@sadasu: This pull request references Jira Issue OCPBUGS-100308, 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 ASSIGNED, 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:

Check if a CRD's version is served before checking if it the stable version. Sometimes, the older unstable versions are not deleted rightaway but these CRDs are not served by default either. That should not cause this test to flag a failure.

Summary by CodeRabbit

  • Bug Fixes
  • Updated CRD version stability checks to ignore versions that are not served, preventing false failures from inactive version specifications.

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

@openshift-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@sadasu: 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-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@sadasu: This PR was included in a payload test run from openshift/api#2859
trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • e2e-aws-ovn

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/358c41e0-8c51-11f1-8da8-371837a4b288-0

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-important Referenced Jira bug's severity is important 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. 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.

3 participants