Skip to content

Internal only: Remove unused field in a helper type in conversion - #4390

Merged
kubevirt-prow[bot] merged 2 commits into
kubevirt:mainfrom
nunnatsa:remove-unused-field
Jul 12, 2026
Merged

kubevirt-prow[bot] merged 2 commits into
kubevirt:mainfrom
nunnatsa:remove-unused-field

Conversation

@nunnatsa

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

Remove the unused DisableMDevConfigurationFG field from the v1OnlyFields type, in the API conversion logic.

Also, improve api conversion fuzz test

  • Test that unknown FGs survive the v1 => v1beta1 => v1 round trip conversion.
  • Randomize the alpha and beta FGs, instead of using hardcode names, so when the hardcoded FG will be graduated or removed, the test will still be effective.

Release note:

None

Signed-off-by: Nahshon Unna Tsameret <nunnatsa@redhat.com>
@kubevirt-prow kubevirt-prow Bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/M labels Jul 12, 2026
@nunnatsa
nunnatsa requested a review from orenc1 July 12, 2026 05:55
@kubevirt-prow
kubevirt-prow Bot requested review from avlitman and sradco July 12, 2026 05:55
@coderabbitai

coderabbitai Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 36e6055a-cea0-4457-bf68-4c165273b513

📥 Commits

Reviewing files that changed from the base of the PR and between 8b6977c and 85d4fae.

📒 Files selected for processing (1)
  • api/v1beta1/conversion_fuzz_test.go
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • kubevirt/hyperconverged-cluster-operator (manual)
  • kubevirt/monitoring (manual)
🚧 Files skipped from review as they are similar to previous changes (1)
  • api/v1beta1/conversion_fuzz_test.go

📝 Walkthrough

Walkthrough

The conversion payload no longer stores DisableMDevConfigurationFG; FeatureGates remains part of the payload and emptiness handling. Conversion fuzz tests now retrieve alpha and beta gate names from featuregatedetails, randomly select known gates and states, and add an unknown mixed-case gate using new helpers.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Warning

Review ran into problems

🔥 Problems

Linked repositories: Your configuration references 13 linked repositories, but your current plan allows 10. Analyzed kubevirt/kubevirt, kubevirt/containerized-data-importer, kubevirt/ssp-operator, kubevirt/cluster-network-addons-operator, kubevirt/hostpath-provisioner-operator, kubevirt/application-aware-quota, kubevirt/managed-tenant-quota, kubevirt/hyperconverged-cluster-operator, kubevirt/monitoring, kubevirt/community, skipped kubevirt/enhancements, kubevirt/project-infra, kubevirt/kubevirtci.


Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. Analyzed kubevirt/hyperconverged-cluster-operator, kubevirt/monitoring, skipped kubevirt/kubevirt, kubevirt/containerized-data-importer, kubevirt/ssp-operator, kubevirt/cluster-network-addons-operator, kubevirt/hostpath-provisioner-operator, kubevirt/application-aware-quota, kubevirt/managed-tenant-quota, kubevirt/community.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
api/v1beta1/conversion_fuzz_test.go (1)

412-412: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Minor: stray { in comment is misleading.

The comment //add unknown FG { includes a trailing { that reads like an opening brace but is just comment text. Consider removing it for clarity.

✏️ Suggested fix
-		if r.IntN(2) == 1 { //add unknown FG {
+		if r.IntN(2) == 1 { // add unknown FG
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api/v1beta1/conversion_fuzz_test.go` at line 412, Remove the stray trailing
“{” from the inline comment in the r.IntN(2) conditional, leaving the comment
text as “add unknown FG”.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@api/v1beta1/conversion_fuzz_test.go`:
- Line 412: Remove the stray trailing “{” from the inline comment in the
r.IntN(2) conditional, leaving the comment text as “add unknown FG”.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: cfe2febc-bfb1-40e4-a25b-7fc459240c1a

📥 Commits

Reviewing files that changed from the base of the PR and between 0abe8c2 and 8b6977c.

📒 Files selected for processing (2)
  • api/v1beta1/conversion.go
  • api/v1beta1/conversion_fuzz_test.go
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • kubevirt/hyperconverged-cluster-operator (manual)
  • kubevirt/monitoring (manual)
💤 Files with no reviewable changes (1)
  • api/v1beta1/conversion.go

@coveralls

coveralls commented Jul 12, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 29182124755

Coverage decreased (-0.001%) to 81.536%

Details

  • Coverage decreased (-0.001%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13881
Covered Lines: 11318
Line Coverage: 81.54%
Coverage Strength: 2.18 hits per line

💛 - Coveralls

* Test that unknown FGs survive the v1 => v1beta1 => v1 round trip
  conversion.
* Randomize the alpha and beta FGs, instead of using hardcode names, so
  when the hardcoded FG will be graduated or removed, the test will
  still be effective.

Signed-off-by: Nahshon Unna Tsameret <nunnatsa@redhat.com>
@nunnatsa
nunnatsa force-pushed the remove-unused-field branch from 8b6977c to 85d4fae Compare July 12, 2026 06:05
@sonarqubecloud

Copy link
Copy Markdown

@hco-bot

hco-bot commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

hco-e2e-upgrade-prev-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws
hco-e2e-upgrade-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-aws
hco-e2e-upgrade-prev-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws
hco-e2e-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-aws
hco-e2e-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-gcp
hco-e2e-upgrade-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws
hco-e2e-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-sno-aws

@kubevirt-prow

kubevirt-prow Bot commented Jul 12, 2026

Copy link
Copy Markdown

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-aws, ci/prow/hco-e2e-operator-sdk-gcp, ci/prow/hco-e2e-operator-sdk-sno-aws, ci/prow/hco-e2e-upgrade-operator-sdk-aws, ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws, ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws, ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws

Details

In response to this:

hco-e2e-upgrade-prev-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws
hco-e2e-upgrade-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-aws
hco-e2e-upgrade-prev-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws
hco-e2e-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-aws
hco-e2e-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-gcp
hco-e2e-upgrade-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws
hco-e2e-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-sno-aws

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.

@hco-bot

hco-bot commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

hco-e2e-consecutive-operator-sdk-upgrades-azure lane succeeded.
/override ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-aws

@kubevirt-prow

kubevirt-prow Bot commented Jul 12, 2026

Copy link
Copy Markdown

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-aws

Details

In response to this:

hco-e2e-consecutive-operator-sdk-upgrades-azure lane succeeded.
/override ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-aws

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.

@openshift-ci

openshift-ci Bot commented Jul 12, 2026

Copy link
Copy Markdown

@nunnatsa: The following tests 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/hco-e2e-operator-sdk-aws 85d4fae link true /test hco-e2e-operator-sdk-aws
ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws 85d4fae link true /test hco-e2e-upgrade-prev-operator-sdk-aws
ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-aws 85d4fae link true /test hco-e2e-consecutive-operator-sdk-upgrades-aws
ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws 85d4fae link false /test hco-e2e-upgrade-prev-operator-sdk-sno-aws
ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws 85d4fae link false /test hco-e2e-upgrade-operator-sdk-sno-aws

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.

@hco-bot

hco-bot commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

hco-e2e-upgrade-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws

@kubevirt-prow

kubevirt-prow Bot commented Jul 12, 2026

Copy link
Copy Markdown

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws

Details

In response to this:

hco-e2e-upgrade-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws

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.

@avlitman

Copy link
Copy Markdown
Collaborator

/approve

@kubevirt-prow

kubevirt-prow Bot commented Jul 12, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: avlitman

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

@kubevirt-prow kubevirt-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 12, 2026
@avlitman

Copy link
Copy Markdown
Collaborator

/lgtm

@kubevirt-prow kubevirt-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 12, 2026
@kubevirt-prow
kubevirt-prow Bot merged commit 3fb9647 into kubevirt:main Jul 12, 2026
33 checks passed
@nunnatsa
nunnatsa deleted the remove-unused-field branch July 12, 2026 11:07
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants