Skip to content

fix(cdi): drop the ExpandDisks gate from the CDI object - #4415

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
fix/kubevirt-cdi-drop-expanddisks-gate
Sep 23, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
fix/kubevirt-cdi-drop-expanddisks-gate

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

This drops a feature gate from the CDI object that CDI never reads. ExpandDisks sits in spec.config.featureGates in packages/system/kubevirt-cdi/templates/cdi-cr.yaml, but it is a KubeVirt gate.

CDI v1.66.1 has no gate with that name. It looks a gate up by exact name, so an extra entry is read and ignored. The CRD types the list as plain strings, so nothing rejects it either. Disk expansion comes from KubeVirt, where ExpandDisks is GA at v1.9.0, the release the platform ships. I left the KubeVirt CR as is; #4029 tracks the GA gates in that list.

The gate list now has its own test case, pinned whole to what upstream's cdi-cr.yaml ships. Adding ExpandDisks back turns it red. make update only checks the upstream file against its pinned hash and writes nothing under templates/, so it can't bring the line back.

Closes #4112

Screenshots

No UI change.

Downstream repositories

Release note

fix(cdi): stop listing the KubeVirt `ExpandDisks` feature gate on the CDI object, where CDI ignored it. Disk expansion is unaffected.

Summary by CodeRabbit

  • Configuration
    • CDI now enables only the HonorWaitForFirstConsumer feature gate. The ExpandDisks gate is no longer included in the configuration.
  • Tests
    • Updated configuration checks to verify the exact feature-gate list and ensure it matches the gate CDI supports.

ExpandDisks is a KubeVirt feature gate. CDI declares no gate by that
name and matches gate names exactly, so the entry was accepted and
ignored. Disk expansion is a KubeVirt feature, GA there at the release
the platform ships, so listing the gate on the CDI object points a
reader tracing where expansion comes from at the wrong component.

The feature-gate list is pinned whole in its own case, so a gate added
beside the one upstream ships turns the suite red.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
@github-actions github-actions Bot added area/virtualization Issues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import) kind/bug Categorizes issue or PR as related to a bug labels Sep 23, 2026
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: cozystack/cozystack/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 7e80c96e-ea1d-47a4-9249-761d15d7d530

📥 Commits

Reviewing files that changed from the base of the PR and between 2b5770c and 0c358ad.

📒 Files selected for processing (2)
  • packages/system/kubevirt-cdi/templates/cdi-cr.yaml
  • packages/system/kubevirt-cdi/tests/local_templates_test.yaml
💤 Files with no reviewable changes (1)
  • packages/system/kubevirt-cdi/templates/cdi-cr.yaml

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The CDI custom resource no longer lists ExpandDisks as a feature gate. The test suite now checks that spec.config.featureGates contains only HonorWaitForFirstConsumer.

Changes

CDI feature gate configuration

Layer / File(s) Summary
Update and verify CDI feature gates
packages/system/kubevirt-cdi/templates/cdi-cr.yaml, packages/system/kubevirt-cdi/tests/local_templates_test.yaml
The template removes ExpandDisks from the feature gate list. The tests assert that the list contains only HonorWaitForFirstConsumer and retain the assertions for local additions.
Estimated code review effort: 2 (Simple) ~5 minutes

Merge Risk: ⚪ Minimal · up to 0c358

The CDI configuration now lists only its remaining gate, with a test protecting that list. No merge-blocking issue is identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing the ExpandDisks feature gate from the CDI object.
Linked Issues check ✅ Passed The PR satisfies issue #4112. It removes ExpandDisks from packages/system/kubevirt-cdi/templates/cdi-cr.yaml. It keeps HonorWaitForFirstConsumer. The new test asserts that the CDI featureGates…
Out of Scope Changes check ✅ Passed The changes stay within issue #4112. They modify the misplaced CDI entry and add a focused regression test. No unrelated configuration change is present in the reviewed diff.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@github-actions github-actions Bot added the size/S This PR changes 10-29 lines, ignoring generated files label Sep 23, 2026
@lexfrei
Aleksei Sviridkin (lexfrei) merged commit 5e46060 into main Sep 23, 2026
20 checks passed
@lexfrei
Aleksei Sviridkin (lexfrei) deleted the fix/kubevirt-cdi-drop-expanddisks-gate branch September 23, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/virtualization Issues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import) kind/bug Categorizes issue or PR as related to a bug size/S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kubevirt-cdi: the CDI CR enables ExpandDisks, which is a KubeVirt gate and not a CDI one

2 participants