Skip to content

WIP Fix flaky test#1402

Open
vincentdephily wants to merge 1 commit into
openshift:mainfrom
vincentdephily:vdp-lightspeed-addtoscheme-flake
Open

WIP Fix flaky test#1402
vincentdephily wants to merge 1 commit into
openshift:mainfrom
vincentdephily:vdp-lightspeed-addtoscheme-flake

Conversation

@vincentdephily

@vincentdephily vincentdephily commented Jun 9, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • Refactor
    • Reorganized internal API type initialization logic for improved code organization.

@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 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 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: 49a3f087-1d9a-4371-aa27-4bb0a3fababd

📥 Commits

Reviewing files that changed from the base of the PR and between 6c6f04d and 115d44c.

📒 Files selected for processing (3)
  • pkg/proposal/controller.go
  • pkg/proposal/controller_test.go
  • pkg/start/start.go
💤 Files with no reviewable changes (2)
  • pkg/proposal/controller_test.go
  • pkg/start/start.go

Walkthrough

This PR relocates proposal API scheme registration from a centralized helper in start.go to the proposal controller package's init function. The change removes code duplication by registering types where the controller owns them, with corresponding cleanup of test imports.

Changes

Scheme Registration Refactor

Layer / File(s) Summary
Scheme registration in controller init
pkg/proposal/controller.go
Proposal controller imports the Kubernetes scheme package and defines an init function that registers proposalv1alpha1 types into the global scheme on package load.
Remove centralized registration from start.go and clean up tests
pkg/start/start.go, pkg/proposal/controller_test.go
The addSchemes helper function and its call are removed from start.go, and the unused scheme import is removed from controller_test.go.

🎯 1 (Trivial) | ⏱️ ~3 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 inconclusive)

Check name Status Explanation Resolution
Ote Binary Stdout Contract ❌ Error The init() in pkg/proposal/controller.go calls AddToScheme during package init. Since imported by OTE binary via test/cvo, it violates stdout contract. Remove init() from pkg/proposal/controller.go or prevent AddToScheme from executing at package init time in OTE binary.
Title check ❓ Inconclusive The title is too vague and generic. It uses a non-descriptive term ('flaky test') without specifying which test or what the actual fix entails, making it unclear what the primary change is. Provide a more specific title that describes the actual fix, such as 'Move scheme registration from controller_test to controller init' or 'Fix flaky test by registering proposalv1alpha1 scheme in init function'.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 PR contains no Ginkgo tests—only modifies implementation and standard Go unit test files that use func Test*() syntax, making the Ginkgo test naming check inapplicable.
Test Structure And Quality ✅ Passed The custom check reviews Ginkgo test quality, but the modified test file (pkg/proposal/controller_test.go) uses standard Go testing, not Ginkgo tests. The check is not applicable to this PR.
Microshift Test Compatibility ✅ Passed New Ginkgo e2e tests in test/cvo/proposal.go are already protected from running on MicroShift via util.SkipIfMicroshift() call in BeforeEach block, which calls g.Skip().
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds no Ginkgo e2e tests. Changes are scheme registration in controller code and unit tests, so SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR changes only refactor API scheme registration between packages, with no deployment manifests or scheduling constraints introduced. No topology-aware scheduling issues detected.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR does not add any Ginkgo e2e tests; it only modifies unit tests and non-test files related to Kubernetes scheme registration.
No-Weak-Crypto ✅ Passed No weak cryptography patterns found. PR only modifies Kubernetes scheme registration; contains no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB usage or custom crypto implementations.
Container-Privileges ✅ Passed This PR only modifies Go source files (controller.go, controller_test.go, start.go) for Kubernetes scheme registration. No container manifests or privilege configurations are added or modified.
No-Sensitive-Data-In-Logs ✅ Passed No logging statements expose sensitive data like passwords, tokens, API keys, PII, or session IDs. The scheme registration error handling uses standard Go panic() practice.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vincentdephily
Once this PR has been reviewed and has the lgtm label, please assign davidhurta 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 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@vincentdephily: 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/verify-update 115d44c link true /test verify-update

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

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant