Skip to content

Commit cb197db

Browse files
committed
add the todos
1 parent f921c50 commit cb197db

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

nexus/reconfigurator/planning/src/mgs_updates/host_phase_1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ pub(super) fn try_make_update(
273273
baseboard_id: &Arc<BaseboardId>,
274274
inventory: &Collection,
275275
current_artifacts: &TufRepoDescription,
276+
// TODO-K: Instead of this convoluted return type use an enum as suggested in
277+
// https://github.com/oxidecomputer/omicron/pull/9001#discussion_r2372837627
276278
) -> Result<
277279
Option<(PendingMgsUpdate, PendingHostPhase2Changes)>,
278280
FailedMgsUpdateReason,

nexus/reconfigurator/planning/src/mgs_updates/rot.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ pub fn try_make_update_rot(
107107
baseboard_id: &Arc<BaseboardId>,
108108
inventory: &Collection,
109109
current_artifacts: &TufRepoDescription,
110+
// TODO-K: Like the Host OS, use an enum here as the return type as suggested in
111+
// https://github.com/oxidecomputer/omicron/pull/9001#discussion_r2372837627
110112
) -> Result<Option<PendingMgsUpdate>, FailedMgsUpdateReason> {
111113
let Some(sp_info) = inventory.sps.get(baseboard_id) else {
112114
return Err(FailedMgsUpdateReason::SpNotInInventory);

nexus/reconfigurator/planning/src/mgs_updates/rot_bootloader.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ pub fn try_make_update_rot_bootloader(
6262
baseboard_id: &Arc<BaseboardId>,
6363
inventory: &Collection,
6464
current_artifacts: &TufRepoDescription,
65+
// TODO-K: Like the Host OS, use an enum here as the return type as suggested in
66+
// https://github.com/oxidecomputer/omicron/pull/9001#discussion_r2372837627
6567
) -> Result<Option<PendingMgsUpdate>, FailedMgsUpdateReason> {
6668
let Some(sp_info) = inventory.sps.get(baseboard_id) else {
6769
return Err(FailedMgsUpdateReason::SpNotInInventory);

nexus/reconfigurator/planning/src/mgs_updates/sp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ pub fn try_make_update_sp(
6161
baseboard_id: &Arc<BaseboardId>,
6262
inventory: &Collection,
6363
current_artifacts: &TufRepoDescription,
64+
// TODO-K: Like the Host OS, use an enum here as the return type as suggested in
65+
// https://github.com/oxidecomputer/omicron/pull/9001#discussion_r2372837627
6466
) -> Result<Option<PendingMgsUpdate>, FailedMgsUpdateReason> {
6567
let Some(sp_info) = inventory.sps.get(baseboard_id) else {
6668
return Err(FailedMgsUpdateReason::SpNotInInventory);

nexus/types/src/deployment/planning_report.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,10 @@ impl PlanningMupdateOverrideStepReport {
486486
)]
487487
#[serde(rename_all = "snake_case")]
488488
#[serde(tag = "type", content = "value")]
489+
// TODO-K: Separate into enums for each component as suggested in
490+
// https://github.com/oxidecomputer/omicron/pull/9001#discussion_r2372863166
491+
// and including more detailed information as suggested in
492+
// https://github.com/oxidecomputer/omicron/pull/9001#discussion_r2372842378
489493
pub enum FailedMgsUpdateReason {
490494
/// The active host phase 1 slot does not match the boot disk
491495
#[error("active phase 1 slot {0:?} does not match boot disk")]

0 commit comments

Comments
 (0)