oxidecomputer / oxidecomputer/omicron

Add progenitor-based client for sled-agent-sim?

Open
#8,900 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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.