oxidecomputer / oxidecomputer/omicron

Improve `cargo xtask openapi` experience when using forks

Open
#7,948 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

development
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.