Conversation
|
Could you update the commit message to provide some background for this change (i.e., describe the problem with also ping @LK4D4 @justincormack PTAL |
|
LGTM @thaJeztah Sort breaks because it treats them as separate fields in the comparison. This may break some tests in docker. |
@stevvooe Yes, tests will have to be updated when this is vendored. Do you think this will be too much of a breaking change? |
|
@thaJeztah I have no clue how breaking this will be. It really depends on if people parse the byte sizes. |
This is to be closer to common Linux outputs.
Most Linux tools output with space before the human size unit.
Examples:
- `du -h`
- `df -h`
- `ls -lh`
- `tree -h`
- `free -h`
Having a space breaks `sort -h` (and makes things like `awk {print $2}`
harder).
See moby/moby#30271
|
I've updated the commit description to include more details. |
|
@wernight can you open a PR to docker/docker to update the vendored version? (and the tests?) |
|
There is issue moby/moby#30271 there, what would be the PR? |
|
The PR would be to update the commit in the vendor file; Run the Let me know if you want to work on that, or want a maintainer to take care of it. |
To include docker/go-units#23
To include docker/go-units#23
To include docker/go-units#23 Fixes a unit test that fails because of it. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
To include docker/go-units#23 Fixes a unit test that fails because of it. Signed-off-by: Vincent Demeester <vincent@sbr.pm> Upstream-commit: 6ef0b64945a6af9666ac601021d8de99317b5207 Component: cli
relevant changes: - docker/go-units#19 make 1 second not to be plural seconds - docker/go-units#20 Add `HumanSizeWithPrecision` function - docker/go-units#21 change week display rule - docker/go-units#22 Better human duration precision - docker/go-units#23 Removes spaces before unit - docker/go-units#27 Fix containerd#26 - RAMInBytes Bug - docker/go-units#33 Fix handling of unlimited (-1) ulimit values - docker/go-units#34 Revert 46 minute threshold Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This is to be closer to common Linux outputs.
See moby/moby#30271