Skip to content

Commit dfd9bba

Browse files
committed
Report the (new) current target blueprint
1 parent 171fe2e commit dfd9bba

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ impl BlueprintPlanner {
6969
return status;
7070
};
7171
let (target, parent) = &*loaded;
72+
status.blueprint_id = parent.id;
7273

7374
// Get the inventory most recently seen by the collection
7475
// background task. The value is `Copy`, so with the deref
@@ -161,6 +162,7 @@ impl BlueprintPlanner {
161162
"parent_blueprint_id" => %parent.id,
162163
"blueprint_id" => %blueprint.id,
163164
);
165+
status.blueprint_id = blueprint.id;
164166

165167
// Save it.
166168
match self.datastore.blueprint_insert(opctx, &blueprint).await {

nexus/types/src/internal_api/background.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,11 @@ pub struct BlueprintPlannerStatus {
471471
pub error: Option<String>,
472472

473473
/// `true` iff the planning run generated a blueprint that is identical
474-
/// to the current target.
474+
/// to the target before planning.
475475
pub unchanged: bool,
476+
477+
/// The id of the (new) current target blueprint.
478+
pub blueprint_id: BlueprintUuid,
476479
}
477480

478481
/// The status of a `alert_dispatcher` background task activation.

0 commit comments

Comments
 (0)