Skip to content

Commit

Permalink
fix(dre): missing node providers on testnets (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaMilosa authored Jun 25, 2024
1 parent 2864b49 commit 95e5432
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions rs/cli/src/registry_dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,18 @@ async fn get_nodes(
chip_id: record.chip_id,
hostos_version_id: record.hostos_version_id,
public_ipv4_config: record.public_ipv4_config,
node_provider_id: node_operators
.get(&node_operator_id)
.expect("Couldn't find node provider for node operator")
.node_provider_principal_id,
node_provider_id: match node_operators.get(&node_operator_id) {
Some(no) => no.node_provider_principal_id,
None => PrincipalId::new_anonymous(),
},
subnet_id: subnets
.iter()
.find(|subnet| subnet.membership.contains(&k))
.map(|subnet| subnet.subnet_id),
dc_id: node_operators
.get(&node_operator_id)
.expect("Couldn't find node provider for node operator")
.dc_id
.clone(),
dc_id: match node_operators.get(&node_operator_id) {
Some(no) => no.dc_id.clone(),
None => "".to_string(),
},
status: nodes_health.get(&node_id).unwrap_or(&ic_management_types::Status::Unknown).clone(),
}
})
Expand Down

0 comments on commit 95e5432

Please sign in to comment.