Skip to content

Commit d6b1ae1

Browse files
committed
remove explicit blueprint arg to planner
1 parent 1756b9d commit d6b1ae1

File tree

5 files changed

+1
-10
lines changed

5 files changed

+1
-10
lines changed

dev-tools/reconfigurator-cli/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2375,7 +2375,6 @@ fn cmd_blueprint_plan(
23752375
.context("failed to construct planning input")?;
23762376
let planner = Planner::new_based_on(
23772377
sim.log.clone(),
2378-
parent_blueprint,
23792378
&planning_input,
23802379
creator,
23812380
collection,

live-tests/tests/test_nexus_add_remove.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,6 @@ async fn test_nexus_add_remove(lc: &LiveTestContext) {
294294
.expect("planning input");
295295
let planner = Planner::new_based_on(
296296
log.clone(),
297-
// TODO john remove dup arg
298-
planning_input.parent_blueprint(),
299297
&planning_input,
300298
"live test suite",
301299
&latest_collection,

nexus/reconfigurator/planning/src/planner.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ pub struct Planner<'a> {
175175
impl<'a> Planner<'a> {
176176
pub fn new_based_on(
177177
log: Logger,
178-
parent_blueprint: &'a Blueprint,
179178
input: &'a PlanningInput,
180179
creator: &str,
181180
// NOTE: Right now, we just assume that this is the latest inventory
@@ -185,7 +184,7 @@ impl<'a> Planner<'a> {
185184
) -> anyhow::Result<Planner<'a>> {
186185
let mut blueprint = BlueprintBuilder::new_based_on(
187186
&log,
188-
parent_blueprint,
187+
input.parent_blueprint(),
189188
creator,
190189
rng,
191190
)?;

nexus/src/app/background/tasks/blueprint_planner.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ impl BlueprintPlanner {
189189
// Generate a new blueprint.
190190
let planner = Planner::new_based_on(
191191
opctx.log.clone(),
192-
&parent,
193192
&input,
194193
"blueprint_planner",
195194
&collection,

nexus/src/app/deployment.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,12 @@ impl super::Nexus {
189189
&self,
190190
opctx: &OpContext,
191191
) -> CreateResult<Blueprint> {
192-
let (_, parent_blueprint) =
193-
self.db_datastore.blueprint_target_get_current_full(opctx).await?;
194-
195192
let planning_context = self.blueprint_planning_context(opctx).await?;
196193
let inventory = planning_context.inventory.ok_or_else(|| {
197194
Error::internal_error("no recent inventory collection found")
198195
})?;
199196
let planner = Planner::new_based_on(
200197
opctx.log.clone(),
201-
&parent_blueprint,
202198
&planning_context.planning_input,
203199
&planning_context.creator,
204200
&inventory,

0 commit comments

Comments
 (0)