Skip to content

Commit 79c0105

Browse files
authored
chore: Remove migration and remnants of blessed versions (#10941)
Now that the record has been removed with #10940, drop the migration and the record type itself. --- Long ago, we stopped requiring an extra proposal to add versions to the `blessed_replica_versions` list. The code continued to depend on this record for much longer, until the `eero/blessed-versions-*` saga of PRs moved everything to use `replica_version_*` records directly, instead. The record is now gone, and the last remaining reference can be removed.
1 parent 86f0389 commit 79c0105

3 files changed

Lines changed: 1 addition & 42 deletions

File tree

rs/protobuf/def/registry/replica_version/v1/replica_version.proto

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,3 @@ message GuestLaunchMeasurementMetadata {
5252
// Supported values can be found in ic-os/defs.bzl under `vcpu_types`.
5353
optional string vcpu_type = 2;
5454
}
55-
56-
// A list of blessed versions of the IC Replica
57-
//
58-
// New versions are added here after a vote has been accepted by token
59-
// holders. Subnetworks can then be upgraded to any of those version.
60-
message BlessedReplicaVersions {
61-
// A list of version information ids.
62-
repeated string blessed_version_ids = 1;
63-
}

rs/protobuf/src/gen/registry/registry.replica_version.v1.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,3 @@ pub struct GuestLaunchMeasurementMetadata {
7878
#[prost(string, optional, tag = "2")]
7979
pub vcpu_type: ::core::option::Option<::prost::alloc::string::String>,
8080
}
81-
/// A list of blessed versions of the IC Replica
82-
///
83-
/// New versions are added here after a vote has been accepted by token
84-
/// holders. Subnetworks can then be upgraded to any of those version.
85-
#[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq, Hash, ::prost::Message)]
86-
pub struct BlessedReplicaVersions {
87-
/// A list of version information ids.
88-
#[prost(string, repeated, tag = "1")]
89-
pub blessed_version_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
90-
}

rs/registry/canister/src/registry_lifecycle.rs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use ic_registry_keys::{
1111
REPLICA_VERSION_KEY_PREFIX, make_node_operator_record_key, make_node_record_key,
1212
make_replica_version_key, make_subnet_list_record_key,
1313
};
14-
use ic_registry_transport::{delete, pb::v1::RegistryMutation, update};
14+
use ic_registry_transport::{pb::v1::RegistryMutation, update};
1515
use ic_types::NodeId;
1616
use maplit::btreemap;
1717
use prost::Message;
@@ -53,12 +53,6 @@ pub fn canister_post_upgrade(
5353
total_batches += 1;
5454
}
5555

56-
let mutations = remove_blessed_version_list_record(registry);
57-
if !mutations.is_empty() {
58-
registry.maybe_apply_mutation_internal(mutations);
59-
total_batches += 1;
60-
}
61-
6256
total_batches
6357
};
6458
//
@@ -411,22 +405,6 @@ fn add_version_id_to_replica_versions(registry: &Registry) -> Vec<RegistryMutati
411405
mutations
412406
}
413407

414-
/// The blessed version list record is no longer used.
415-
/// If it still exists, delete it.
416-
fn remove_blessed_version_list_record(registry: &Registry) -> Vec<RegistryMutation> {
417-
if registry
418-
.get(
419-
"blessed_replica_versions".as_bytes(),
420-
registry.latest_version(),
421-
)
422-
.is_some()
423-
{
424-
vec![delete("blessed_replica_versions".as_bytes())]
425-
} else {
426-
Vec::new()
427-
}
428-
}
429-
430408
#[cfg(test)]
431409
mod test {
432410
use super::*;

0 commit comments

Comments
 (0)