Skip to content

Updated salt/modules/disk.py to fix postPrefixes by a factor of 10. p… #65543

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

vib795
Copy link

@vib795 vib795 commented Nov 13, 2023

What does this PR do?

What issues does this PR fix or reference?

Fixes: #65490

Previous Behavior

1.0K gives 10000.0

New Behavior

1.0K should give 1000.0

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes/No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

…ostPrefixes renamed to unit_suffixes as per themowski's suggestions.
@vib795 vib795 requested a review from a team as a code owner November 13, 2023 20:07
@vib795 vib795 requested review from twangboy and removed request for a team November 13, 2023 20:07
@s0undt3ch
Copy link
Collaborator

We'll need unit tests around _parse_numbers please.

@s0undt3ch s0undt3ch added the Needs-Testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases label Nov 20, 2023
@vib795
Copy link
Author

vib795 commented Dec 3, 2023

@s0undt3ch added unit test for the PR

@dwoz dwoz added this to the Argon v3008.0 milestone Dec 18, 2023
@leeclemens
Copy link
Contributor

@vib795 IMHO, just a minor thought, but it may be more symmetrical and slightly easier to read if they are formatted the same way decimal.Decimal displays the values (e.g. 1E+12).

@dwoz dwoz requested a review from a team as a code owner March 16, 2025 22:09
Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

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

This needs a changelog. Please migrate the test to pytests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Byte conversion factors off by power of 10 in _parse_numbers() in modules/disk.py
5 participants