Skip to content

Conversation

@jgallagher
Copy link
Contributor

This is staged on top of #9347 and is a part of #9238. In particular, by moving this from the builder to the planner, we can remove the builder's need for an inventory collection entirely.

There should be no functional changes here; it's just moving code around (with some reformatting to break it up a bit) and then removing the collection argument from all the callers of BlueprintBuilder::new_based_on().

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.

Looks great. Thanks!

InlineErrorChain::new(&err),
);

// If planning the new config failed, carry forward our
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding this extra comment here.

Base automatically changed from john/prune-blueprint-resource-allocator to main November 10, 2025 19:49
@jgallagher jgallagher merged commit dbbe333 into main Nov 10, 2025
16 checks passed
@jgallagher jgallagher deleted the john/planner-configures-clickhouse branch November 10, 2025 23:01
jgallagher added a commit that referenced this pull request Nov 12, 2025
This builds on top of #9370 and is a big piece of #9238: as of this PR,
`BlueprintBuilder` no longer holds a `PlanningInput`, which should
reduce confusion on where a given bit of logic should live. Anything
that needs the planning input to be decided now _must_ be implemented in
the planner.

`BlueprintBuilder::new_based_on(..)` still takes a `PlanningInput`
argument, which I don't love but need to do some more work to figure out
how (if?) to address. It uses it for a few things; I think I'd group
them as:

1. Reassembling information about sleds that we knew in previous
iterations but that aren't stored in the blueprint. (Specifically: the
`BaseboardId` and subnet of each active sleds. This is the one that
seems trickiest to tackle.)
2. Adding new, empty `SledEditor`s for commissioned sleds that are
present in `PlanningInput` but not the parent blueprint. (I think I'd
make the case that `new_based_on()` shouldn't do this at all, and the
planner should do it?)
3. Making a copy of a few fields that are present in the blueprint, but
that are updated each time the planner runs based on potentially-newer
values in `PlanningInput`. (Specifically: the cockroachdb fingerprint
and the internal/external DNS generations. I think it would be fine for
`BlueprintBuilder` to only copy the parent blueprint, and provide
setters that the planner could use to update these to newer values.)

There's one hopefully-small-and-fine logical change in this PR that I'll
point out below with some extra details.
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