Skip to content

Humane disk/image sizes in error messages #1443

@david-crespo

Description

@david-crespo

Moved from oxidecomputer/console#1049.

Disk sizes are in bytes and that makes them hard to read and work with. We could do something about this on the client, but it would be very brittle.

There's an interesting wrinkle here, which is that because what matters are byte sizes, how you should round the sizes may depend on the particular values in question. For example, if you're looking at Error: Disk size was 999 bytes, but it needs to be at least 1000 bytes, both of those would be 1 KB in a naive approach, making the message useless. So in order to do this well, the error serializer needs to take into account what is being said. (This may be an argument against doing anything about this for the time being.)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions