Skip to content

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

Open
vib795 wants to merge 12 commits into
saltstack:masterfrom
vib795:bug-fix-65490
Open

Updated salt/modules/disk.py to fix postPrefixes by a factor of 10. p…#65543
vib795 wants to merge 12 commits into
saltstack:masterfrom
vib795:bug-fix-65490

Conversation

@vib795
Copy link
Copy Markdown

@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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@twangboy twangboy added needs-changelog Tests test:full Run the full test suite and removed needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases Tests labels Jul 2, 2025
@twangboy
Copy link
Copy Markdown
Contributor

Please add a changelog, rebase, and resolve conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-changelog test:full Run the full test suite

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