Skip to content

Conversation

@gangwgr
Copy link
Contributor

@gangwgr gangwgr commented Nov 25, 2025

No description provided.

An informer for an empty namespace will list resources from all namespaces
and cluster level. This may be undesirable, as this makes the controller
react to events from different namespaces, while we're only interested in
cluster-level events for clusterInformers.

This prevents kas-operator from becoming degraded when unrelated namespace
secrets are corrupted, which was causing false positive degradations.

The fix removes the empty string namespace parameter that was causing the
operator to watch ALL namespaces, and instead uses cluster-level only
informers as intended by library-go#1985.

Fixes: OCPBUGS-59626
Related: library-go#1985
@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Excluded labels (none allowed) (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@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 Nov 25, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 25, 2025

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 25, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found here.

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

Prepare test files for Ginkgo migration by renaming:

test/e2e/:
- bound_sa_token_test.go → bound_sa_token.go
- certrotation_test.go → certrotation.go
- deprecated_api_test.go → deprecated_api.go
- encryption_test.go → encryption.go
- operator_test.go → operator.go
- serviceaccountissuer_test.go → serviceaccountissuer.go
- user_certs_test.go → user_certs.go
- user_client_ca_test.go → user_client_ca.go
- user_cors_test.go → user_cors.go

test/e2e-encryption/:
- encryption_test.go → encryption.go
- main_test.go (removed - no longer needed)

test/e2e-encryption-perf/:
- encryption_perf_test.go → encryption_perf.go

test/e2e-encryption-rotation/:
- encryption_rotation_test.go → encryption_rotation.go

test/e2e-sno-disruptive/:
- sno_disruptive_test.go → sno_disruptive.go

No content changes in this commit - pure renames only.
- Add Ginkgo test wrappers with g.Describe() and g.It() blocks
- Convert test functions to use testing.TB interface (supports both *testing.T and GinkgoTB())
- Add proper test tags: [Serial], [Slow], [Timeout:Xm]
- Update imports: use local test/library instead of vendored library-go
- Fix stdout pollution: redirect log messages to stderr in test/library functions
  (prevents "Found configuration" messages from breaking OTE JSON output)
- Update OTE test extension main.go with test discovery logic

This enables OpenShift Tests Extension (OTE) discovery and execution of tests.
- Add github.com/onsi/ginkgo/v2 for BDD-style test wrappers
- Add github.com/onsi/gomega for Ginkgo assertions
- Add github.com/go-task/slim-sprig/v3 (Ginkgo dependency)
- Add replace directive for OpenShift's Ginkgo fork with OTE support
- Update vendor dependencies via go mod tidy && go mod vendor

Dependencies automatically detected from test imports.

Replace directive:
replace github.com/onsi/ginkgo/v2 => github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20250416174521-4eb003743b54
@gangwgr gangwgr force-pushed the ginkgo-migration-clean branch from 10e2f3d to b810a7b Compare November 25, 2025 10:04
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 28, 2025
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

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.

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants