oxidecomputer / oxidecomputer/omicron

Humane disk/image sizes in error messages

Open
#1,443 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

Moved from https://github.com/oxidecomputer/console/issues/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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the error serializer and reviewing how disk and image byte sizes are rendered; done should mean error messages are more readable without collapsing distinct values such as 999 and 1000 bytes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.