-
Notifications
You must be signed in to change notification settings - Fork 24
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
Issue-468 The display of "hammr quota list" collapses... #491
Conversation
...when disk usage "Consumed > Limit" * Handle the case when the consumed disk usage is greater than the quota size limit. * Respect PEP8 recommandations * Extracted all possible code into functions * Added many TestCases Fix issue #468
The previous work is on the PR #472 |
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.
Thanks for this commit, the refactor and new tests are really nice :)
I have only small comments about it.
Also there is a general issue in hammr at the moment, the build is passing but a test is failing (not related at all to your commit, you can take a look at the travis build if you want to know more about it). We need to wait for this issue to be fixed before merging your PR
...when disk usage "Consumed > Limit" * Handle the case when the consumed disk usage is greater than the quota size limit. * Respect PEP8 recommandations * Extracted all possible code into functions * Added many TestCases Fix issue #468
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.
To be honest, it's really difficult to find the fix as you made a refactor in the same commit. For me it will be better to make the refactor in another commit.
hammr/commands/quota/quota.py
Outdated
elif quota.type == constants.QUOTAS_GENERATION: | ||
text = self.print_plural_quota("Generation", quota) + self.get_quota_nb(quota) | ||
elif quota.type == constants.QUOTAS_DISK_USAGE: | ||
text = self.print_plural_quota("Disk usage", quota) + self.get_quota_nb_binary(quota) |
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.
Why get_quota_nb_binary is used only for disk usage ? You changed the behavior for other quotas here.
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.
Ok, I reverted some commits.
The current patch is only fixing the ISSUE #468 and nothing else.
I'll PR a second commit to fix a second bug then a third commit to refactor quota class.
Each PR will be linked to a github issue i'll create later.
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.
Ok for me. Just be careful to edit the commit message, there are some info no more valid
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.
Ok for me too, you will need to merge the master inside your branch to solve the CI issue though
update fork
PR message fixed. |
...when disk usage "Consumed > Limit"
Handle the case when the consumed disk usage is greater than the quota size limit.
Fix issue The display of "hammr quota list" collapses when disk usage "Consumed > Limit" #468