oxidecomputer / oxidecomputer/omicron
Add progenitor-based client for sled-agent-sim?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
sled-agent-sim has a few endpoints that don't exist on sled-agent and aren't part of the real sled-agent dropshot API. Our sled-agent-client has methods that call these endpoints by dropping down to reqwest.
#8895 made the first versioned change to the sled-agent API, which broke these methods because they weren't getting the api-version header that progenitor adds in its generated method. That PR works around this by manually adding that header in each of these endpoints, but that's a little janky. It's probably okay for the time being, but @davepacheco suggested an alternative: we could define a lockstep dropshot API containing only the extra sled-agent-sim endpoints and add a progenitor client for that API to ControlPlaneTestContext. Then we'd get api-version for free, we wouldn't need these extra methods at all, and we'd continue to get any future changes that rely on progenitor.
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 in clients/sled-agent-client/src/lib.rs, especially the methods linked in the issue, and inspect ControlPlaneTestContext and the existing sled-agent API definitions. Define the lockstep sled-agent-sim API and progenitor client so these endpoints receive the api-version header without manual reqwest methods; done means the extra methods are no longer needed and future progenitor-based changes remain supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100