Skip to content

Conversation

@upalatucci
Copy link
Member

@upalatucci upalatucci commented Feb 4, 2026

Summary

Implements CNV-77387: UI: GA Eject/Inject CD-ROM Support — remove the feature gate switch so the feature is generally available.

Changes

  • Preview features: Removed the "Enable advanced CD-ROM features" toggle from Settings → Cluster overview → Preview features.
  • VM disks: Mount/Eject actions for CD-ROM disks are now always shown in the disk kebab menu (no feature gate check).
  • Helpers: Removed isDeclarativeHotplugVolumesEnabled; simplified isHotPluggableEnabled. Add CD-ROM modal no longer gates on the feature.

Acceptance criteria

  • Removing the feature gate switch — everything works the same; CD-ROM eject/inject is now GA in the UI.

Summary by CodeRabbit

Release Notes

  • Chores
    • Removed Advanced CD-ROM Features from the preview features list.
    • Simplified CD-ROM operations behavior by removing associated feature flag dependencies.
    • Updated translations across English, Spanish, French, Japanese, Korean, and Chinese locales.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 4, 2026

@upalatucci: This pull request references CNV-77383 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary

Implements CNV-77383: UI: GA Eject/Inject CD-ROM Support — remove the feature gate switch so the feature is generally available.

Changes

  • Preview features: Removed the "Enable advanced CD-ROM features" toggle from Settings → Cluster overview → Preview features.
  • VM disks: Mount/Eject actions for CD-ROM disks are now always shown in the disk kebab menu (no feature gate check).
  • Helpers: Removed isDeclarativeHotplugVolumesEnabled; simplified isHotPluggableEnabled. Add CD-ROM modal no longer gates on the feature.

Acceptance criteria

  • Removing the feature gate switch — everything works the same; CD-ROM eject/inject is now GA in the UI.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from avivtur and rszwajko February 4, 2026 19:58
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 4, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: upalatucci

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 This issue is something we want to fix label Feb 4, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

This PR removes the Advanced CD-ROM features functionality by deleting translation entries across six language locales, eliminating the feature flag constant, removing related helper functions, and cleaning up all component references to this feature flag.

Changes

Cohort / File(s) Summary
Localization files
locales/en/plugin__kubevirt-plugin.json, locales/es/plugin__kubevirt-plugin.json, locales/fr/plugin__kubevirt-plugin.json, locales/ja/plugin__kubevirt-plugin.json, locales/ko/plugin__kubevirt-plugin.json, locales/zh/plugin__kubevirt-plugin.json
Removed translation entries for "Enable advanced CD-ROM features" across all supported languages.
Feature flag and helpers
src/utils/hooks/useFeatures/constants.ts, src/utils/components/DiskModal/utils/helpers.ts
Deleted ADVANCED_CDROM_FEATURES constant; removed isDeclarativeHotplugVolumesEnabled helper and simplified isHotPluggableEnabled logic.
Component updates
src/utils/components/DiskModal/AddCDROMModal.tsx, src/views/clusteroverview/SettingsTab/PreviewFeaturesTab/hooks/usePreviewFeaturesData.tsx, src/views/virtualmachines/details/tabs/configuration/storage/components/tables/disk/DiskRowActions.tsx
Removed feature gate dependencies, eliminated Advanced CD-ROM feature from preview features list, and replaced conditional rendering logic for CD-ROM operations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • rszwajko
  • avivtur
  • galkremer1
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing the feature gate switch to make CD-ROM Eject/Inject functionality generally available (GA).
Description check ✅ Passed The description provides a comprehensive summary of changes, references the Jira issue, lists specific modifications across multiple areas, and confirms acceptance criteria are met.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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

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.

- Remove 'Enable advanced CD-ROM features' toggle from Settings > Preview features
- Show Mount/Eject for CD-ROM disks without checking declarative hotplug feature gate
- Eject/Inject CD-ROM is now generally available in the UI
@upalatucci upalatucci force-pushed the cnv-77383-ga-cdrom-eject-inject branch from 9f4b961 to 040aea4 Compare February 4, 2026 20:00
@upalatucci upalatucci changed the title CNV-77383: GA Eject/Inject CD-ROM - remove feature gate switch CNV-77387: GA Eject/Inject CD-ROM - remove feature gate switch Feb 4, 2026
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 4, 2026

@upalatucci: This pull request references CNV-77387 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary

Implements CNV-77383: UI: GA Eject/Inject CD-ROM Support — remove the feature gate switch so the feature is generally available.

Changes

  • Preview features: Removed the "Enable advanced CD-ROM features" toggle from Settings → Cluster overview → Preview features.
  • VM disks: Mount/Eject actions for CD-ROM disks are now always shown in the disk kebab menu (no feature gate check).
  • Helpers: Removed isDeclarativeHotplugVolumesEnabled; simplified isHotPluggableEnabled. Add CD-ROM modal no longer gates on the feature.

Acceptance criteria

  • Removing the feature gate switch — everything works the same; CD-ROM eject/inject is now GA in the UI.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 4, 2026

@upalatucci: This pull request references CNV-77387 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary

Implements CNV-77387: UI: GA Eject/Inject CD-ROM Support — remove the feature gate switch so the feature is generally available.

Changes

  • Preview features: Removed the "Enable advanced CD-ROM features" toggle from Settings → Cluster overview → Preview features.
  • VM disks: Mount/Eject actions for CD-ROM disks are now always shown in the disk kebab menu (no feature gate check).
  • Helpers: Removed isDeclarativeHotplugVolumesEnabled; simplified isHotPluggableEnabled. Add CD-ROM modal no longer gates on the feature.

Acceptance criteria

  • Removing the feature gate switch — everything works the same; CD-ROM eject/inject is now GA in the UI.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 4, 2026

@upalatucci: This pull request references CNV-77387 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Summary

Implements CNV-77387: UI: GA Eject/Inject CD-ROM Support — remove the feature gate switch so the feature is generally available.

Changes

  • Preview features: Removed the "Enable advanced CD-ROM features" toggle from Settings → Cluster overview → Preview features.
  • VM disks: Mount/Eject actions for CD-ROM disks are now always shown in the disk kebab menu (no feature gate check).
  • Helpers: Removed isDeclarativeHotplugVolumesEnabled; simplified isHotPluggableEnabled. Add CD-ROM modal no longer gates on the feature.

Acceptance criteria

  • Removing the feature gate switch — everything works the same; CD-ROM eject/inject is now GA in the UI.

Summary by CodeRabbit

Release Notes

  • Chores
  • Removed Advanced CD-ROM Features from the preview features list.
  • Simplified CD-ROM operations behavior by removing associated feature flag dependencies.
  • Updated translations across English, Spanish, French, Japanese, Korean, and Chinese locales.

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 openshift-eng/jira-lifecycle-plugin repository.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/utils/components/DiskModal/utils/helpers.ts`:
- Around line 324-326: Change the isHotPluggableEnabled signature to include an
explicit boolean return type and allow undefined input: update the function
declaration for isHotPluggableEnabled to have a return type of boolean (and make
the featureGates parameter optional if you want to preserve the current
undefined-safe behavior), keeping the body as-is and continuing to reference
HotPlugFeatures.HotplugVolumes.

Comment on lines 324 to 326
export const isHotPluggableEnabled = (featureGates: string[]) => {
if (isDeclarativeHotplugVolumesEnabled(featureGates)) {
if (!featureGates?.includes(HotPlugFeatures.HotplugVolumes)) {
return true;
}
}
return false;
return !featureGates?.includes(HotPlugFeatures.HotplugVolumes);
};
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n src/utils/components/DiskModal/utils/helpers.ts | sed -n '320,330p'

Repository: kubevirt-ui/kubevirt-plugin

Length of output: 413


🏁 Script executed:

rg -n 'DeclarativeHotplugVolumes' --type=ts --type=tsx

Repository: kubevirt-ui/kubevirt-plugin

Length of output: 98


🏁 Script executed:

rg -n 'HotPlugFeatures' src/utils/components/DiskModal/utils/helpers.ts -A 2 -B 2

Repository: kubevirt-ui/kubevirt-plugin

Length of output: 437


🏁 Script executed:

rg -n 'DeclarativeHotplugVolumes' --type ts

Repository: kubevirt-ui/kubevirt-plugin

Length of output: 696


🏁 Script executed:

fd constants.ts | head -5 | xargs cat -n | head -100

Repository: kubevirt-ui/kubevirt-plugin

Length of output: 1685


🏁 Script executed:

rg -n 'isDeclarativeHotplugVolumesEnabled' --type ts

Repository: kubevirt-ui/kubevirt-plugin

Length of output: 53


🏁 Script executed:

cat -n src/utils/components/DiskModal/utils/constants.ts | head -50

Repository: kubevirt-ui/kubevirt-plugin

Length of output: 903


Add explicit return type for consistency with coding guidelines.

The logic simplification is correct, and the optional chaining handles undefined input gracefully. However, add an explicit return type annotation:

-export const isHotPluggableEnabled = (featureGates: string[]) => {
+export const isHotPluggableEnabled = (featureGates: string[]): boolean => {
   return !featureGates?.includes(HotPlugFeatures.HotplugVolumes);
 };

Note: HotPlugFeatures.DeclarativeHotplugVolumes remains actively used in the codebase for the Advanced CD-ROM feature flag functionality, so it is not dead code.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const isHotPluggableEnabled = (featureGates: string[]) => {
if (isDeclarativeHotplugVolumesEnabled(featureGates)) {
if (!featureGates?.includes(HotPlugFeatures.HotplugVolumes)) {
return true;
}
}
return false;
return !featureGates?.includes(HotPlugFeatures.HotplugVolumes);
};
export const isHotPluggableEnabled = (featureGates: string[]): boolean => {
return !featureGates?.includes(HotPlugFeatures.HotplugVolumes);
};
🤖 Prompt for AI Agents
In `@src/utils/components/DiskModal/utils/helpers.ts` around lines 324 - 326,
Change the isHotPluggableEnabled signature to include an explicit boolean return
type and allow undefined input: update the function declaration for
isHotPluggableEnabled to have a return type of boolean (and make the
featureGates parameter optional if you want to preserve the current
undefined-safe behavior), keeping the body as-is and continuing to reference
HotPlugFeatures.HotplugVolumes.

};

export const isHotPluggableEnabled = (featureGates: string[]) => {
if (isDeclarativeHotplugVolumesEnabled(featureGates)) {
Copy link
Member

Choose a reason for hiding this comment

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

I assume that we can confirm that we no longer need to explicitly check if there is a discrepancy between the two featuregates. Are both featuregates removed on 4.22?

@upalatucci
Copy link
Member Author

/hold

we don't know if the feature gate will be removed for 4.22

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

Labels

approved This issue is something we want to fix do-not-merge/hold jira/valid-reference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants