-
Notifications
You must be signed in to change notification settings - Fork 62
Clean up a variety of tests that create blueprints #9393
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
Open
jgallagher
wants to merge
16
commits into
main
Choose a base branch
from
john/cleanup-blueprint-building-in-tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jgallagher
commented
Nov 12, 2025
| // If used for RSS tests (most of the time!), the blueprint built by this | ||
| // builder will need to have its `parent_blueprint_id` manually set to | ||
| // `None` to erase the link to the empty parent. | ||
| fn blueprint_builder_with_empty_parent( |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still kinda janky, and was earlier in the stack of work that produced this PR. I think I could go through these tests again and replace most or all uses of this with more ExampleSystemBuilder usage, if folks think that'd be better.
Base automatically changed from
sunshowers/spr/reconfigurator-cli-update-snapshots
to
main
November 13, 2025 00:29
…omoting internal NTP
e7417cd to
263cd1f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'd like to add a couple new fields to
BlueprintSledConfig, and doing so broke a variety of tests in annoying ways. Many of those tests have required annoying changes in the past, too. This PR doesn't add any new fields, but instead attempts to clean up those tests so changes to Reconfigurator structures are less likely to cause problems (and hopefully any problems will be easier to fix). A couple techniques:BlueprintBuilderorExampleSystemBuilderBlueprintBuilder::build_empty_with_sleds{,_seeded}withBlueprintBuilder::build_empty{,_seeded}. The former added some sleds with nothing on them; the latter adds no sleds at all. I updated all the callers ofbuild_empty_with_sledsto either usebuild_empty(actually fine for most of them) or the example system infrastructure.This does add a few new helper methods on real types; e.g.,
BlueprintBuilder::sled_add_zone_boundary_ntp()(for directly adding a boundary NTP instead of promoting an existing internal NTP zone). But currently only tests call these new methods, and I don't think they're prone to misuse; e.g.,sled_add_zone_boundary_ntp()checks and fails if called on a sled that already has an in-service NTP zone of either flavor.(This is staged on top of #9392 to pick up that fix for
main.)