oxidecomputer / oxidecomputer/omicron

thing-flinger has some hard-coded assumptions that are not universally true

Open
#828 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

  • The assumption that rustup modified $HOME/.profile is not universal; I think this is dependent on how the remote machine installed rust:
    https://github.com/oxidecomputer/omicron/blob/2103a5f8bfe2ea03a272db92651b01bd1a1c972f/package/src/bin/thing-flinger.rs#L527-L529

  • The "build", "package", and "check" commands attempt to perform a git checkout - I don't think we should assume that the remote filesystem is a git repository (it doesn't seem necessary here, and modifying which commit a user is operating on as a part of their build process seems bug-prone). As an example, I have traditionally rsync'd all files except my .git repository when developing between multiple machines.

https://github.com/oxidecomputer/omicron/blob/2103a5f8bfe2ea03a272db92651b01bd1a1c972f/package/src/bin/thing-flinger.rs#L198

https://github.com/oxidecomputer/omicron/blob/2103a5f8bfe2ea03a272db92651b01bd1a1c972f/package/src/bin/thing-flinger.rs#L222

https://github.com/oxidecomputer/omicron/blob/2103a5f8bfe2ea03a272db92651b01bd1a1c972f/package/src/bin/thing-flinger.rs#L239

  • The choice of "debug" seems hardcoded in several spots (see: target/debug vs target/release) - it would be nice to have this be configurable

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

Start in package/src/bin/thing-flinger.rs, inspecting the rustup profile handling around lines 527-529, the git checkout operations around lines 198, 222, and 239, and the hard-coded debug paths. Trace the build, package, and check commands first. Done means these commands no longer rely on those remote-environment assumptions and the debug/release choice is configurable.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.