oxidecomputer / oxidecomputer/humility

would like an idempotent humility flash with verification

Open
#394 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
584
Forks
63
Avg merge
3h
Merged PRs (30d)
2

Description

Right now, the humility flash --verify command does almost everything we want: it checks not merely the image ID but also the ROM contents to make sure they match the image. Somewhat regrettably it then exits with a non-zero status code if the image is actually correct, informing the user that they should rerun with --force if they want to rewrite the ROM even though it ostensibly matches.

I think this behaviour is useful in the cases where you expect that the ROM is not correct and want to know if your expectations are not met. However, in manufacturing we have to do basically this every time:

if ! humility flash --check; then
    humility flash --verify
fi

It would be really helpful if there was a humility flash --verify --idempotent (or whatever) that does what flash --verify does today, but which still exits 0 if it did not have to do any work.

Contributor guide

No contributing guide indexed for this repository

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

Locate the flash command entry point and compare how --check and --verify determine their exit statuses. Add the requested idempotent mode so verification still succeeds with status 0 when the ROM already matches, then exercise the existing flash verification behavior and confirm the normal non-idempotent status remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.