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

Remove more OmicronZoneConfig to BlueprintZoneConfig conversions #5584

Merged
merged 4 commits into from
Apr 22, 2024

Conversation

jgallagher
Copy link
Contributor

This builds on #5583; see it for rationale.

We remove half of the remaining callers that want to convert OmicronZoneConfig into BlueprintZoneConfig:

  • nexus-test-utils's quasi-RSS: This now works in terms of BlueprintZoneConfig, and converts down to OmicronZoneConfig when necessary. This is the kind of transformation we'd like to make in real RSS, too, although it will be more complex there.
  • One unit test in nexus-reconfigurator-execution: replaced using the representative() collection (which includes a collection from a live system, but no blueprint) with the example() system (which produces both a collection and a matching blueprint).
  • Blueprint diffing - the types for the "before" side (which can be a collection or a blueprint) are now wrapped in two-variant enums, with some helpers for comparisons, instead of converting the collection to a blueprint.

The remaining users of this conversion direction are the most difficult, but at least we're down to three:

  • nexus-db-model does this conversion to use some shared database serialization logic. This will necessarily change when we add to blueprints, since the serialization logic won't be shared anymore (or at least not as shared).
  • RSS; see note above. We might be able to handle this like we did nexus-test-utils; I'll see when it becomes necessary.
  • The DNS test that uses data from a live system.

Even if the last two have to keep this conversion direction for now (which will become more complex as data is added), at least it's only two! That should be manageable even if the process gets a little messy.

Base automatically changed from john/remove-blueprint-from-collection to main April 20, 2024 16:47
The "before" side of a blueprint diff can be a collection or a
blueprint. This makes that explicit by wrapping the "before" cases in
two-variant enums instead of converting the collection zones into
blueprint zones (as that will soon become messier).
@jgallagher jgallagher force-pushed the john/fewer-omicron-zone-to-blueprint-zone branch from d91fa2e to b7919d4 Compare April 20, 2024 16:48
@jgallagher jgallagher merged commit 49b76b1 into main Apr 22, 2024
20 checks passed
@jgallagher jgallagher deleted the john/fewer-omicron-zone-to-blueprint-zone branch April 22, 2024 21:10
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