Skip to content

Conversation

@mergeconflict
Copy link
Contributor

@mergeconflict mergeconflict commented Jan 13, 2026

Based on #9634, this PR implements a skeleton /v1/external-subnets REST API for allocating external subnets from subnet pools, and attaching them to instances, as described in RFD 599.

Created using jj-spr 0.1.0
Created using jj-spr 0.1.0

[skip ci]
@mergeconflict mergeconflict marked this pull request as draft January 13, 2026 23:53
Copy link
Collaborator

@bnaecker bnaecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks pretty good! I just have one substantive suggestion to strengthen the types around creating subnets, but otherwise seems like a solid start.

Created using jj-spr 0.1.0

[skip ci]
Created using jj-spr 0.1.0
Created using jj-spr 0.1.0

[skip ci]
Created using jj-spr 0.1.0
Created using jj-spr 0.1.0

[skip ci]
Created using jj-spr 0.1.0
Created using jj-spr 0.1.0

[skip ci]
Created using jj-spr 0.1.0
Created using jj-spr 0.1.0

[skip ci]
Created using jj-spr 0.1.0
@mergeconflict mergeconflict marked this pull request as ready for review January 15, 2026 20:19
Created using jj-spr 0.1.0

[skip ci]
Created using jj-spr 0.1.0
mergeconflict added a commit that referenced this pull request Jan 17, 2026
…ernal API (#9669)

From discussion in
#9638 (comment),
we decided that `AddressSelector` is a bit of a misnomer in our current
scheme, where "selector" implies filtering/fetching from existing
resources. We'll use `AddressAllocator` instead, which better describes
the action of reserving/assigning a floating IP address from a pool.

I've also done a bit of refactoring here to be more RFD 619 friendly.
Before this PR, we had a series of `FloatingIpCreate` versions that each
had `From` or `TryFrom` conversions directly to the latest API version
in "big step" style. This becomes an _O(n)^2_ problem to maintain over
time. Instead, in this PR, we convert to "small step" style, where each
older version of `FloatingIpCreate` converts to the next newer version.
In the terms of the RFD, we "[hop through intermediate
versions](https://rfd.shared.oxide.computer/rfd/0619#determinations-one-prior-version)."
This ensures that the next time we change `FloatingIpCreate`, we only
need to introduce one new conversion, rather than update all older
conversions.

I've added proptests to make our expectations of the conversion behavior
more explicit and prevent regressions.
Created using jj-spr 0.1.0

[skip ci]
Created using jj-spr 0.1.0
@mergeconflict mergeconflict changed the base branch from spr/mergeconflict/main.rfd-599-implement-skeleton-external-subnets-api to spr/mergeconflict/rfd-599-implement-skeleton-subnet-pools-api January 17, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants