diff --git a/rs/cli/Cargo.toml b/rs/cli/Cargo.toml index 4afe0922f..0b8902250 100644 --- a/rs/cli/Cargo.toml +++ b/rs/cli/Cargo.toml @@ -7,7 +7,18 @@ edition = "2021" [dependencies] serde = { version = "1.0.130", features = ["derive"] } -clap = { version = "3.1.6", features = ["derive", "env"] } +clap = { version = "4.2.7", features = [ + "derive", + "env", + "usage", + "color", + "help", + "error-context", + "suggestions", + "wrap_help", + "string", + "cargo", +] } reqwest = { version = "0.11", features = ["json"] } serde_json = "1.0.68" anyhow = "1.0.44" @@ -30,14 +41,14 @@ tokio = { version = "1.14.0", features = ["full"] } strum = { version = "0.24.1", features = ["derive"] } strum_macros = "0.24.3" flate2 = "1.0.22" -dirs = "4.0" +dirs = "5.0.1" decentralization = { path = "../decentralization" } ic-management-types = { path = "../ic-management-types" } dialoguer = "0.10.0" itertools = "0.10" async-trait = "0.1.53" -keyring = "1.1.2" -cryptoki = "0.3.0" +keyring = "2.0.2" +cryptoki = "0.3.1" candid = "0.8.4" url = "2.3.1" clap-num = "1.0.0" diff --git a/rs/cli/src/cli.rs b/rs/cli/src/cli.rs index b7b6b4b8a..2caa7bcdd 100644 --- a/rs/cli/src/cli.rs +++ b/rs/cli/src/cli.rs @@ -7,15 +7,15 @@ use ic_management_types::Network; pub struct Opts { #[clap(long, env = "HSM_PIN")] pub(crate) hsm_pin: Option, - #[clap(long, parse(try_from_str=maybe_hex), env = "HSM_SLOT")] + #[clap(long, value_parser=maybe_hex::, env = "HSM_SLOT")] pub(crate) hsm_slot: Option, - #[clap(short, long, env = "HSM_KEY_ID")] + #[clap(long, env = "HSM_KEY_ID")] pub(crate) hsm_key_id: Option, #[clap(long, env = "PRIVATE_KEY_PEM")] pub(crate) private_key_pem: Option, - #[clap(short, long, env = "NEURON_ID")] + #[clap(long, env = "NEURON_ID")] pub(crate) neuron_id: Option, - #[clap(short, long, env = "IC_ADMIN")] + #[clap(long, env = "IC_ADMIN")] pub(crate) ic_admin: Option, #[clap(long, env = "DEV")] pub(crate) dev: bool, @@ -97,16 +97,16 @@ pub(crate) mod subnet { motivation: Option, /// Minimum Nakamoto coefficients after the replacement - #[clap(long, takes_value = true, multiple_values = true)] + #[clap(long, num_args(1..))] min_nakamoto_coefficients: Vec, /// Features or Node IDs to exclude from the available nodes pool - #[clap(long, takes_value = true, multiple_values = true)] + #[clap(long, num_args(1..))] exclude: Vec, /// Force the inclusion of the provided nodes for replacement, /// regardless of the decentralization score - #[clap(long, takes_value = true, multiple_values = true)] + #[clap(long, num_args(1..))] include: Vec, /// More verbose execution. For instance, print logs from the @@ -121,12 +121,12 @@ pub(crate) mod subnet { size: usize, /// Features or Node IDs to exclude from the available nodes pool - #[clap(long, takes_value = true, multiple_values = true)] + #[clap(long, num_args(1..))] exclude: Vec, /// Force the inclusion of the provided nodes for replacement, /// regardless of the decentralization score - #[clap(long, takes_value = true, multiple_values = true)] + #[clap(long, num_args(1..))] include: Vec, /// Motivation for extending the subnet diff --git a/rs/cli/src/ic_admin.rs b/rs/cli/src/ic_admin.rs index 4246ce9b1..cd8895db3 100644 --- a/rs/cli/src/ic_admin.rs +++ b/rs/cli/src/ic_admin.rs @@ -615,7 +615,7 @@ fn detect_hsm_auth() -> Result> { let info = ctx.get_slot_info(slot)?; if info.slot_description().starts_with("Nitrokey Nitrokey HSM") { let key_id = format!("hsm-{}-{}", info.slot_description(), info.manufacturer_id()); - let pin_entry = Entry::new("release-cli", &key_id); + let pin_entry = Entry::new("release-cli", &key_id)?; let pin = match pin_entry.get_password() { Err(Error::NoEntry) => Password::new().with_prompt("Please enter the HSM PIN: ").interact()?, Ok(pin) => pin, diff --git a/rs/cli/src/main.rs b/rs/cli/src/main.rs index 7bb23eebf..156cdb1e8 100644 --- a/rs/cli/src/main.rs +++ b/rs/cli/src/main.rs @@ -1,5 +1,5 @@ use crate::cli::version::Commands::{Bless, Retire, Update}; -use clap::{CommandFactory, ErrorKind, Parser}; +use clap::{error::ErrorKind, CommandFactory, Parser}; use ic_management_types::requests::NodesRemoveRequest; use ic_management_types::{MinNakamotoCoefficients, Network, NodeFeature}; use std::collections::BTreeMap; diff --git a/rs/decentralization/Cargo.toml b/rs/decentralization/Cargo.toml index 992247856..d0a2d3c58 100644 --- a/rs/decentralization/Cargo.toml +++ b/rs/decentralization/Cargo.toml @@ -30,7 +30,7 @@ log = "0.4.14" tabular = "0.2" rayon = "1.5.1" easy-parallel = "3.1.0" -lru = "0.6.6" +lru = "0.10.0" [dev-dependencies] include_dir = "0.7.2" diff --git a/rs/ic-management-backend/Cargo.toml b/rs/ic-management-backend/Cargo.toml index 587e3fbcc..537926665 100644 --- a/rs/ic-management-backend/Cargo.toml +++ b/rs/ic-management-backend/Cargo.toml @@ -23,7 +23,7 @@ actix-web = { version = "4.2.1", default-features = false, features = [ ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "0a239c213c048563577969276739b090aa31c241" } ic-registry-keys = { git = "https://github.com/dfinity/ic.git", rev = "0a239c213c048563577969276739b090aa31c241" } anyhow = "1.0.43" -serde_with = "2.0.1" +serde_with = "3.0.0" futures = "0.3.16" serde_yaml = "0.9.11" reqwest = { version = "0.11.4", features = ["json"] } @@ -45,7 +45,7 @@ strum = "0.24.1" strum_macros = "0.24.3" itertools = "0.10.1" log = "0.4.14" -env_logger = "0.9.0" +env_logger = "0.10.0" reverse_geocoder = "3.0.1" csv = "1.1.6" candid = "0.8.4" diff --git a/rs/slack-notifications/Cargo.toml b/rs/slack-notifications/Cargo.toml index 7dd3b032a..fba248040 100644 --- a/rs/slack-notifications/Cargo.toml +++ b/rs/slack-notifications/Cargo.toml @@ -23,7 +23,7 @@ dotenv = "0.15.0" prost = "0.11.0" strum = "0.24.1" strum_macros = "0.24.3" -retry = "1.3.1" +retry = "2.0.0" itertools = "0.10.1" regex = "1.5.4" lazy_static = "1.4.0"