-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 1891766: Stop non-positive values from being entered by users for min disk size #7890
Bug 1891766: Stop non-positive values from being entered by users for min disk size #7890
Conversation
@SanjalKatiyar: This pull request references Bugzilla bug 1891766, which is invalid:
Comment In response to this:
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/test-infra repository. |
Hi @SanjalKatiyar. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
/bugzilla refresh |
@SanjalKatiyar: This pull request references Bugzilla bug 1891766, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
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/test-infra repository. |
/bugzilla refresh |
@bipuladh: This pull request references Bugzilla bug 1891766, which is valid. 3 validation(s) were run on this bug
In response to this:
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/test-infra repository. |
const validMinDiskSize = /^\+?([1-9]\d*)$/.test(state.minDiskSize || '1'); | ||
const validMaxDiskSize = /^\+?([1-9]\d*)$/.test(state.maxDiskSize || '1'); | ||
const validMaxDiskLimit = /^\+?([1-9]\d*)$/.test(state.maxDiskLimit || '1'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const validMinDiskSize = /^\+?([1-9]\d*)$/.test(state.minDiskSize || '1'); | |
const validMaxDiskSize = /^\+?([1-9]\d*)$/.test(state.maxDiskSize || '1'); | |
const validMaxDiskLimit = /^\+?([1-9]\d*)$/.test(state.maxDiskLimit || '1'); | |
const INTEGER_REGEX = /^\+?([1-9]\d*)$/; | |
const validMinDiskSize = INTEGER_REGEX.test(state.minDiskSize || '1'); | |
const validMaxDiskSize = INTEGER_REGEX.test(state.maxDiskSize || '1'); | |
const validMaxDiskLimit = INTEGER_REGEX.test(state.maxDiskLimit || '1'); |
7e0a19b
to
4136c45
Compare
I think the minimum size for a disk can be 0 as well. Also, I think we need to put one more validation where the value to max disk size should be bigger than the value of min disk size. @bipuladh ^^ |
I agree with you @cloudbehl . @SanjalKatiyar I guess we will need two regex patterns. One that accepts 0 and the other one that doesn't. |
4136c45
to
707f2e5
Compare
...ges/local-storage-operator-plugin/src/components/local-volume-set/local-volume-set-inner.tsx
Outdated
Show resolved
Hide resolved
...s/local-storage-operator-plugin/src/components/local-volume-set/create-local-volume-set.scss
Outdated
Show resolved
Hide resolved
707f2e5
to
c0b76f4
Compare
.lso-create-lvs__max-disk-limit { | ||
max-width: 100px; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this as well and use the other class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay... using single class for min disk size, max disk size and max disk limit...
c0b76f4
to
13b92b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bipuladh, SanjalKatiyar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
/hold cancel |
/retest |
@SanjalKatiyar: All pull requests linked via external trackers have merged: Bugzilla bug 1891766 has been moved to the MODIFIED state. In response to this:
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/test-infra repository. |
Before:
After: