Skip to content

Conversation

@jianzhangbjz
Copy link
Member

Description of the change:
This PR fixes the unit test timeouts in pkg/controller/operators and pkg/controller/operators/openshift packages that occur after the K8s 1.35 upgrade.

Motivation for the change:
To address openshift/operator-framework-olm#1208 (comment)

Architectural changes:

After upgrading to K8s 1.35, the WatchListClient feature gate is enabled by default. However, envtest environments don't fully support WatchList semantics, causing informer caches to hang indefinitely while waiting for sync. This results in test timeouts after 10 minutes:

panic: test timed out after 10m0s                                                                                                                                       
    running tests:                                                                                                                                                      
        TestAPIs (10m0s)                                                                                                                                                
FAIL    github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators    600.143s                                                                   

Add TestMain function to disable the WatchListClient feature gate before tests run, forcing informers to use the traditional List+Watch behavior instead of the new WatchList semantics.

Testing remarks:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Bug fixes are accompanied by regression test(s)
  • e2e tests and flake fixes are accompanied evidence of flake testing, e.g. executing the test 100(0) times
  • tech debt/todo is accompanied by issue link(s) in comments in the surrounding code
  • Tests are comprehensible, e.g. Ginkgo DSL is being used appropriately
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive
  • Tests marked as [FLAKE] are truly flaky and have an issue
  • Code is properly formatted

Assisted-By: Claude-COde

@tmshort
Copy link
Contributor

tmshort commented Feb 2, 2026

I had to add something similar to one of my unit tests for TLS Profiles.
See: kubernetes/kubernetes#135895

@tmshort
Copy link
Contributor

tmshort commented Feb 2, 2026

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 2, 2026
@tmshort
Copy link
Contributor

tmshort commented Feb 2, 2026

/approve

@openshift-ci
Copy link

openshift-ci bot commented Feb 2, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmshort

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 Feb 2, 2026
@openshift-merge-bot openshift-merge-bot bot merged commit 2ab26dd into operator-framework:master Feb 2, 2026
14 checks passed
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants