Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sled-agent] turn API into a trait #6159

Merged
merged 6 commits into from
Aug 13, 2024

Conversation

sunshowers
Copy link
Contributor

@sunshowers sunshowers commented Jul 25, 2024

Building on the changes in #6138, this PR turns the sled-agent API into a trait. This is
high-impact because it currently is part of a circular dependency with the
Nexus internal API -- this PR gets us to the point where the OpenAPI documents
can be generated independently of each other.

There is some code movement but there are no functional changes in this PR -- I
didn't use replace here to keep the PR small. I'll try out replace for some
of the types with From impls in a subsequent PR.

(I did change the internal VpcFirewallRule to ResolvedVpcFirewallRule to
match the other types in the destination file.)

I've also added some documentation about when nexus-sled-agent-shared should
be used.

Depends on #6283.

Created using spr 1.3.6-beta.1
@sunshowers sunshowers marked this pull request as draft July 25, 2024 19:35
@sunshowers
Copy link
Contributor Author

sunshowers commented Jul 25, 2024

Going to defer this until #5749 lands. (Also need to fix up the illumos build.)

Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
@sunshowers sunshowers changed the base branch from main to sunshowers/spr/main.sled-agent-turn-api-into-a-trait August 10, 2024 20:39
@sunshowers sunshowers marked this pull request as ready for review August 10, 2024 20:57
sunshowers added a commit that referenced this pull request Aug 12, 2024
Previously, we would carry around a DNS resolver -- however, the resolver has
been unused for a while. And in fact there's a warning about being careful
around using it.

Because the type was public, the rustc dead code detector didn't figure that
out until my change to switch to an API trait in #6159 exposed this.

Remove `NexusClientWithResolver`, adding a couple of free functions to make a
`NexusClient` instead.
@sunshowers sunshowers changed the base branch from sunshowers/spr/main.sled-agent-turn-api-into-a-trait to main August 12, 2024 18:35
Created using spr 1.3.6-beta.1
Copy link
Contributor

@andrewjstone andrewjstone left a comment

Choose a reason for hiding this comment

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

Epic work @sunshowers. Thank you so much.

Created using spr 1.3.6-beta.1
@sunshowers sunshowers enabled auto-merge (squash) August 13, 2024 21:03
@sunshowers sunshowers merged commit 544fa4c into main Aug 13, 2024
25 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/sled-agent-turn-api-into-a-trait branch August 13, 2024 22:24
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.

2 participants