Skip to content

Conversation

@upalatucci
Copy link
Member

@upalatucci upalatucci commented Feb 11, 2026

📝 Description

The template catalog drawer was incorrectly enforcing the root disk minimum size (e.g. 60 GiB) on the CD-ROM source input. The SelectSource component always computed minDiskValue from the root disk via getRootDiskStorageRequests, regardless of whether it was being used for the CD-ROM or the main disk.

This fix only enforces the root disk minimum when withSize is true, which is only passed for the actual disk source. For the CD-ROM source (withSize defaults to false), minDiskValue is now undefined, correctly skipping the minimum size validation.

Jira: https://issues.redhat.com/browse/CNV-79541

🎥 Demo

BEFORE
image (1)

AFTER

No error message

Screenshot 2026-02-11 at 17 06 01

Summary by CodeRabbit

  • Bug Fixes
    • Improved disk storage validation to correctly handle cases where size information is unavailable.

The template drawer was enforcing the root disk minimum size (e.g. 60 GiB)
on the CD-ROM source input. The CD-ROM is independent from the root disk
and should not have this constraint. Only enforce the root disk minimum
when withSize is true, which is only set for the actual disk source.

Co-authored-by: Cursor <[email protected]>
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 11, 2026

@upalatucci: This pull request references CNV-79541 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 bug to target the "4.22.0" version, but no target version was set.

Details

In response to this:

📝 Description

The template catalog drawer was incorrectly enforcing the root disk minimum size (e.g. 60 GiB) on the CD-ROM source input. The SelectSource component always computed minDiskValue from the root disk via getRootDiskStorageRequests, regardless of whether it was being used for the CD-ROM or the main disk.

This fix only enforces the root disk minimum when withSize is true, which is only passed for the actual disk source. For the CD-ROM source (withSize defaults to false), minDiskValue is now undefined, correctly skipping the minimum size validation.

Jira: https://issues.redhat.com/browse/CNV-79541

🎥 Demo

TODO: add screenshot/video

Made with Cursor

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
Copy link
Contributor

openshift-ci bot commented Feb 11, 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 11, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

Modified conditional logic in the SelectSource component to calculate minDiskValue only when withSize is true. This affects downstream validation logic affecting the isMinusDisabled state.

Changes

Cohort / File(s) Summary
Storage Value Calculation
src/views/catalog/templatescatalog/components/TemplatesCatalogDrawer/StorageSection/CustomizeSource/SelectSource.tsx
Modified minDiskValue computation to be conditional on withSize flag; when false, minDiskValue becomes undefined, affecting downstream validation logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

lgtm, approved

Suggested reviewers

  • lkladnit
  • galkremer1
  • metalice
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main fix: correcting minimum disk size validation incorrectly applied to CD-ROM sources.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description comprehensively covers the bug, root cause, fix, and includes demo screenshots showing before/after behavior.

✏️ 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.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 11, 2026

@upalatucci: This pull request references CNV-79541 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 bug to target the "4.22.0" version, but no target version was set.

Details

In response to this:

📝 Description

The template catalog drawer was incorrectly enforcing the root disk minimum size (e.g. 60 GiB) on the CD-ROM source input. The SelectSource component always computed minDiskValue from the root disk via getRootDiskStorageRequests, regardless of whether it was being used for the CD-ROM or the main disk.

This fix only enforces the root disk minimum when withSize is true, which is only passed for the actual disk source. For the CD-ROM source (withSize defaults to false), minDiskValue is now undefined, correctly skipping the minimum size validation.

Jira: https://issues.redhat.com/browse/CNV-79541

🎥 Demo

BEFORE
image (1)

AFTER

No error message

Made with Cursor

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 11, 2026

@upalatucci: This pull request references CNV-79541 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 bug to target the "4.22.0" version, but no target version was set.

Details

In response to this:

📝 Description

The template catalog drawer was incorrectly enforcing the root disk minimum size (e.g. 60 GiB) on the CD-ROM source input. The SelectSource component always computed minDiskValue from the root disk via getRootDiskStorageRequests, regardless of whether it was being used for the CD-ROM or the main disk.

This fix only enforces the root disk minimum when withSize is true, which is only passed for the actual disk source. For the CD-ROM source (withSize defaults to false), minDiskValue is now undefined, correctly skipping the minimum size validation.

Jira: https://issues.redhat.com/browse/CNV-79541

🎥 Demo

BEFORE
image (1)

AFTER

No error message

Screenshot 2026-02-11 at 17 06 01

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 11, 2026

@upalatucci: This pull request references CNV-79541 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 bug to target the "4.22.0" version, but no target version was set.

Details

In response to this:

📝 Description

The template catalog drawer was incorrectly enforcing the root disk minimum size (e.g. 60 GiB) on the CD-ROM source input. The SelectSource component always computed minDiskValue from the root disk via getRootDiskStorageRequests, regardless of whether it was being used for the CD-ROM or the main disk.

This fix only enforces the root disk minimum when withSize is true, which is only passed for the actual disk source. For the CD-ROM source (withSize defaults to false), minDiskValue is now undefined, correctly skipping the minimum size validation.

Jira: https://issues.redhat.com/browse/CNV-79541

🎥 Demo

BEFORE
image (1)

AFTER

No error message

Screenshot 2026-02-11 at 17 06 01

Summary by CodeRabbit

  • Bug Fixes
  • Improved disk storage validation to correctly handle cases where size information is unavailable.

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.

@upalatucci
Copy link
Member Author

/hold

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.

2 participants