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

formatters(image): prevent image size from displaying scientific notation #5059

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

servusdei2018
Copy link

fixes #3091
dupe #4459

- What I did

HumanSizeWithPrecision (which was configured to 3 significant digits) was replaced with HumanSize (which defaults to 4) in order to prevent scientific notation from appearing under certain edge cases. This is a known bug (docker/go-units#44) in the affected dependency.

In practical terms, adjusting the precision from 3 to 4 should cause no issues with users' current expectations and usage of the cli.

- How to verify it

Regression tests implemented to prevent future breakage.

- Description for the changelog

formatters(image): prevent image size from displaying scientific notation under edge cases

@thaJeztah
Copy link
Member

I think this PR was pending to fix it in go-units, but there was some discussion on it and I don't recall exactly where we ended up;

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

Successfully merging this pull request may close these issues.

Image size reported as 1e+03MB by docker image ls
2 participants