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

[reconfigurator] BlueprintBuilder cleanup 5/5 - Convert discretionary ensure_zone_multiple_* to add_zone_* #7107

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

jgallagher
Copy link
Contributor

All of the callers of the ensure_zone_multiple_* methods to add discretionary zones were, in practice, wanting to add a specific number of zones. This rewords all of those methods to be imperative, allowing us to remove a pretty significant chunk of now-unnecessary checks and logic.

Builds on and is staged on top of #7106.

Copy link
Contributor

@plotnick plotnick left a comment

Choose a reason for hiding this comment

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

This cleanup was sorely needed. I suspect I was not alone in being tempted to do it every time I added another ensure_zone_* function, but it wasn't on-task; thanks for making it a task and getting it done!

Comment on lines -578 to -584
// TODO-cleanup This is awkward: the builder wants to know how many
// total zones go on a given sled, but we have a count of how many
// we want to add. Construct a new target count. Maybe the builder
// should provide a different interface here?
Copy link
Contributor

Choose a reason for hiding this comment

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

This was my very least favorite question in the planner. Thanks for answering it!

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.

Awesome!

@jgallagher jgallagher force-pushed the john/reconfigurator-storage-4 branch from a0c5837 to f3652cc Compare November 21, 2024 18:19
Base automatically changed from john/reconfigurator-storage-4 to main November 22, 2024 16:27
@jgallagher jgallagher force-pushed the john/builder-ensure-add branch from 2d3ada7 to eaef3ae Compare November 25, 2024 15:06
@jgallagher jgallagher merged commit 106e722 into main Nov 25, 2024
16 checks passed
@jgallagher jgallagher deleted the john/builder-ensure-add branch November 25, 2024 16:38
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.

3 participants