oxidecomputer / oxidecomputer/omicron
Improve `cargo xtask openapi` experience when using forks
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
Currently, cargo xtask openapi assumes your local omicron's main branch is git@github.com:oxidecomputer/omicron.git. This may not be the case if you are using a fork, or decided to name your remote repo something other than origin. This behaviour can currently be overridden with the --blessed-from-git flag. But it's not necessarily obvious.
On way to make this functionality clearer is to have the tool check git remote show origin and warn if it's not the canonical source of Omicron. The following could be the suggested actions in that warning:
- use --blessed-from-git=upstream/main every time you want to do this
- set OPENAPI_MGR_BLESSED_FROM_GIT/upstream/main in your environment
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the cargo xtask openapi entry point and the existing --blessed-from-git handling. Inspect how the command determines its Git remote, then verify the warning covers fork or non-origin setups and points to the flag and OPENAPI_MGR_BLESSED_FROM_GIT alternatives. Done means the guidance appears when the canonical source is not detected without breaking the existing override.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- api, cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100