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

[nexus-types] use TypedUuid<SledKind> in blueprint-internal code #5488

Conversation

sunshowers
Copy link
Contributor

Most APIs aren't changing, nor is the OpenAPI schema for now -- just code
internal to the blueprint.

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Copy link
Contributor

@jgallagher jgallagher left a comment

Choose a reason for hiding this comment

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

Excited to see this expanding - thanks!

// Temporarily make a clone of the parent blueprint's zones so we can use
// typed UUIDs everywhere. Once we're done migrating, this `Cow` can be
// removed.
parent_zones: Cow<'a, BTreeMap<TypedUuid<SledKind>, BlueprintZonesConfig>>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just making sure I understand: the Cow is technically unnecessary (we always construct it as Cow::Owned), but is just here as a hint to remind us to switch it back to &'a BTreeMap<...>?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, exactly. This is a temporary situation.

@sunshowers sunshowers merged commit 20299e0 into main Apr 10, 2024
21 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/nexus-types-use-typeduuidsledkind-in-blueprint-internal-code branch April 10, 2024 20:09
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