Skip to content
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

Added decimal support to bucket quota selectors #2126

Merged
merged 2 commits into from Jun 15, 2022

Conversation

bexsoft
Copy link
Collaborator

@bexsoft bexsoft commented Jun 15, 2022

What does this do?

  • Added decimal support to bucket quota selectors
  • Fixed an issue with calculateBytes function
  • Fixed add bucket form validations

How does it look?

Screen Shot 2022-06-14 at 23 07 20

Screen Shot 2022-06-14 at 23 07 10

Screen Shot 2022-06-14 at 23 07 04

Screen Shot 2022-06-15 at 14 55 46

Screen Shot 2022-06-15 at 14 55 37

Signed-off-by: Benjamin Perez benjamin@bexsoft.net

Copy link
Member

@prakashsvmx prakashsvmx left a comment

Choose a reason for hiding this comment

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

Observations:

  1. We could apply same changes in Create Bucket screen as well.
  2. With mc
mc admin bucket quota local/b-bucket --hard 1.7GB
Successfully set bucket quota of 1.6 GiB with hard type on `b-bucket`

mc admin bucket quota local/b-bucket 
Bucket `b-bucket` has hard quota of 1.6 GiB

so as per the above mc commands, ~0.1 is lesser capacity is set for quota

but if we update from the UI, it sets the exact value.
e.g 2.6 GB gets updated as 2.6 GB

Otherwise changes look good to me 👍

@bexsoft
Copy link
Collaborator Author

bexsoft commented Jun 15, 2022

Observations:

  1. We could apply same changes in Create Bucket screen as well.
  2. With mc
mc admin bucket quota local/b-bucket --hard 1.7GB
Successfully set bucket quota of 1.6 GiB with hard type on `b-bucket`

mc admin bucket quota local/b-bucket 
Bucket `b-bucket` has hard quota of 1.6 GiB

so as per the above mc commands, ~0.1 is lesser capacity is set for quota

but if we update from the UI, it sets the exact value. e.g 2.6 GB gets updated as 2.6 GB

Otherwise changes look good to me 👍

I think this is related to GB vs GiB conversion, so this should be expected

@bexsoft
Copy link
Collaborator Author

bexsoft commented Jun 15, 2022

Found issues with Add Bucket form validation. Will fix them on this PR as well

@bexsoft bexsoft added the WIP This PR is WIP and cannot be merged yet label Jun 15, 2022
@bexsoft bexsoft changed the title Added decimal support to bucket quota selectors [WIP] Added decimal support to bucket quota selectors Jun 15, 2022
- Fixed an issue with calculateBytes function
- Fixed add bucket validation form

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
@bexsoft bexsoft changed the title [WIP] Added decimal support to bucket quota selectors Added decimal support to bucket quota selectors Jun 15, 2022
@bexsoft bexsoft removed the WIP This PR is WIP and cannot be merged yet label Jun 15, 2022
Copy link
Collaborator

@cniackz cniackz left a comment

Choose a reason for hiding this comment

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

LGTM

@dvaldivia dvaldivia merged commit 7ecc102 into minio:master Jun 15, 2022
@dvaldivia dvaldivia deleted the decimal-buckets branch June 15, 2022 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants