oxidecomputer / oxidecomputer/propolis

propolis-server API types can have different definitions depending on feature flags

Open
#264 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api
Dominant language
Rust
Stars
270
Forks
42
Avg merge
4d 5h
Merged PRs (30d)
6

Description

#231 makes the InstanceSpec type and its components part of the propolis-server API. Some of InstanceSpec's components are conditionally compiled based on the value of the falcon feature flag, so enabling/disabling the flag changes propolis-server's OpenAPI specification. This can create some friction when working with types generated from the OpenAPI spec (if the spec's falcon configuration differs from the builder's configuration). When fixed, #227 will create a similar problem for PCI bridges.

We can eliminate this toil in a couple of ways:

  1. Create/maintain separate OpenAPI descriptions to be used when the falcon feature is enabled (or when other features are enabled/disabled)
  2. Maintain a single definition of the InstanceSpec types, but make propolis-server recognize and honor the Falcon-only elements only when the feature is enabled (and similarly honor other options only when their corresponding features are enabled)

Contributor guide

No contributing guide indexed for this repository

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 reviewing issue #231 and the propolis-server API/OpenAPI generation path described here. Compare the specification with Falcon enabled and disabled, and consider the two approaches outlined in the issue. Done means feature configuration no longer causes incompatible API type definitions, including the future PCI bridge case from #227.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.