Skip to content

Commit

Permalink
chore(deps): manual upgrade of deps (#1217)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaMilosa authored Jan 17, 2025
1 parent 201582c commit 8797762
Show file tree
Hide file tree
Showing 18 changed files with 2,842 additions and 2,826 deletions.
4,380 changes: 2,184 additions & 2,196 deletions Cargo.Bazel.lock

Large diffs are not rendered by default.

1,100 changes: 552 additions & 548 deletions Cargo.lock

Large diffs are not rendered by default.

120 changes: 60 additions & 60 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ actix-web = { version = "4.9.0", default-features = false, features = [
] }
actix-rt = "2.10.0"
ahash = "0.8.11"
anyhow = "1.0.94"
anyhow = "1.0.95"
async-recursion = "1.1.1"
axum-otel-metrics = "0.8.1"
axum = "0.7.9"
backoff = { version = "0.4.0", features = ["tokio"] }
backon = "1.3.0"
candid = "0.10.10"
chrono = { version = "0.4.38", features = ["serde"] }
candid = "0.10.12"
chrono = { version = "0.4.39", features = ["serde"] }
clap-num = "1.1"
clap = { version = "4.5", features = [
"derive",
Expand All @@ -62,11 +62,12 @@ clap = { version = "4.5", features = [
"string",
"cargo",
] }
clap_complete = "4.5.38"
colored = "2.1.0"
clap_complete = "4.5.42"
colored = "2.2.0"
comfy-table = "7.1.3"
assert_cmd = "2.0.16"
crossbeam = "0.8.4"
crossbeam-channel = "0.5.13"
crossbeam-channel = "0.5.14"
cryptoki = "0.7.0"
custom_error = "1.9.2"
decentralization = { path = "rs/decentralization" }
Expand All @@ -76,7 +77,7 @@ dirs = "5.0.1"
dotenv = "0.15.0"
base64 = "0.22.1"
edit = "0.1.5"
env_logger = "0.11.5"
env_logger = "0.11.6"
erased-serde = "0.4.5"
flate2 = "1.0.35"
fs-err = "3.0.0"
Expand All @@ -86,63 +87,62 @@ futures-util = "0.3.31"
hex = "0.4.3"
humantime = "2.1.0"
humantime-serde = "1.1.1"
ic-agent = "0.39.1"
ic-agent = "0.39.2"
octocrab = "0.41.2"
self_update = { version = "0.41.0", default-features = false, features = [
"archive-tar",
"rustls",
] }
ic-async-utils = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-canister-client = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-canister-client-sender = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-base-types = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-canister-client = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-canister-client-sender = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-canisters = { path = "rs/ic-canisters" }
ic-nervous-system-common-test-keys = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-cdk = { git = "https://github.com/dfinity/cdk-rs.git", rev = "8f57d6d26b1d142b5be4b39ea8ade59d7c848cde" }
ic-config = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-crypto-utils-threshold-sig-der = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-http-endpoints-metrics = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-interfaces-registry = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-nervous-system-common-test-keys = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-cdk = { git = "https://github.com/dfinity/cdk-rs.git", rev = "929fd0b31e9ec69aad7cf6285df0394f25fe1815" }
ic-config = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-crypto-utils-threshold-sig-der = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-http-endpoints-metrics = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-interfaces-registry = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-management-backend = { path = "rs/ic-management-backend" }
ic-management-canister-types = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-management-canister-types = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-management-types = { path = "rs/ic-management-types" }
ic-metrics = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-nns-common = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-nns-constants = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-nns-governance = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-nns-governance-api = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-protobuf = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-canister-client = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-client = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-client-fake = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-client-helpers = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-common-proto = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-keys = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-local-registry = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-local-store = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-local-store-artifacts = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-nns-data-provider = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-subnet-type = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-registry-transport = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-sys = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-types = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-nervous-system-root = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-nervous-system-clients = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-sns-wasm = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
cycles-minting-canister = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-icrc1-test-utils = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
rosetta-core = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
icp-ledger = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
icrc-ledger-types = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
ic-transport-types = "0.39.1"
ic-utils = "0.39.0"
ic-metrics = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-nns-common = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-nns-constants = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-nns-governance = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-nns-governance-api = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-protobuf = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-canister-client = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-client = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-client-fake = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-client-helpers = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-common-proto = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-keys = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-local-registry = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-local-store = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-local-store-artifacts = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-nns-data-provider = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-subnet-type = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-registry-transport = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-sys = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-types = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-nervous-system-root = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-nervous-system-clients = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-sns-wasm = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
cycles-minting-canister = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-icrc1-test-utils = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
rosetta-core = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
icp-ledger = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
icrc-ledger-types = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
ic-transport-types = "0.39.2"
ic-utils = "0.39.2"
itertools = "0.13.0"
keyring = { version = "3.6.1", features = [
"apple-native",
"sync-secret-service",
] }
lazy_static = "1.5.0"
log = "0.4.22"
log = "0.4.25"
lru = "0.12.5"
num-traits = "0.2"
opentelemetry = { version = "0.22.0", features = ["metrics"] }
Expand All @@ -156,7 +156,7 @@ prost = "0.13"
rand = { version = "0.8.5", features = ["std_rng"] }
rand_seeder = "0.3.0"
regex = "1.11.1"
registry-canister = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
registry-canister = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls-webpki-roots",
"blocking",
Expand All @@ -166,13 +166,13 @@ rstest = { version = "0.23.0", default-features = false }
rust_decimal = "1.36.0"
rust_decimal_macros = "1.36.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0.133", default-features = false, features = [
serde_json = { version = "1.0.135", default-features = false, features = [
"preserve_order",
] }
serde_yaml = "0.9.34"
shlex = "1.3.0"
sha2 = "0.10.8"
simple_asn1 = "0.6.2"
simple_asn1 = "0.6.3"
slog-async = { version = "2.8.0", features = ["nested-values"] }
slog-term = "2.9.1"
slog = { version = "2.7.0", features = [
Expand All @@ -186,20 +186,20 @@ strum = { version = "0.26.3", features = ["derive"] }
strum_macros = "0.26.4"
tabled = "0.16.0"
tabular = "0.2"
tempfile = "3.14.0"
thiserror = "2.0.4"
tokio = { version = "1.42.0", features = ["full"] }
tokio-util = "0.7.12"
tempfile = "3.15.0"
thiserror = "2.0.11"
tokio = { version = "1.43.0", features = ["full"] }
tokio-util = "0.7.13"
url = "2.5.4"
wiremock = "0.6.2"
human_bytes = "0.4"
mockall = "0.13.1"

# dre-canisters dependencies
ic-cdk-timers = { git = "https://github.com/dfinity/cdk-rs.git", rev = "8f57d6d26b1d142b5be4b39ea8ade59d7c848cde" }
ic-cdk-macros = { git = "https://github.com/dfinity/cdk-rs.git", rev = "8f57d6d26b1d142b5be4b39ea8ade59d7c848cde" }
ic-cdk-timers = { git = "https://github.com/dfinity/cdk-rs.git", rev = "929fd0b31e9ec69aad7cf6285df0394f25fe1815" }
ic-cdk-macros = { git = "https://github.com/dfinity/cdk-rs.git", rev = "929fd0b31e9ec69aad7cf6285df0394f25fe1815" }
ic-stable-structures = "0.6.7"
dfn_core = { git = "https://github.com/dfinity/ic.git", rev = "a700085f0575a440cb44941da69cfa2efeea3ab9" }
dfn_core = { git = "https://github.com/dfinity/ic.git", rev = "ac71086bf4d6854e8612d21f8104ba839283dc48" }
node-provider-rewards-lib = { path = "rs/dre-canisters/node-provider-rewards-lib" }

# dre-airflow deps, should be replaced with dre-airflow once
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ aspect_bazel_lib_dependencies()

aspect_bazel_lib_register_toolchains()

IC_REPO_VERSION = "a700085f0575a440cb44941da69cfa2efeea3ab9"
IC_REPO_VERSION = "ac71086bf4d6854e8612d21f8104ba839283dc48"

http_archive(
name = "ic_repo",
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ENV CARGO_HOME=/cargo
COPY docker /docker

# Download ic-admin
ARG ic_git_revision=a700085f0575a440cb44941da69cfa2efeea3ab9
ARG ic_git_revision=ac71086bf4d6854e8612d21f8104ba839283dc48
RUN curl --fail https://download.dfinity.systems/ic/${ic_git_revision}/release/ic-admin.gz -o - | gunzip -c >| /usr/bin/ic-admin && \
chmod +x /usr/bin/ic-admin

Expand Down
4 changes: 2 additions & 2 deletions ic-revisions.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"https://github.com/dfinity/ic.git": {
"commit": "a700085f0575a440cb44941da69cfa2efeea3ab9",
"commit": "ac71086bf4d6854e8612d21f8104ba839283dc48",
"ref": "refs/heads/master"
},
"https://github.com/dfinity/cdk-rs.git": {
"commit": "8f57d6d26b1d142b5be4b39ea8ade59d7c848cde",
"commit": "929fd0b31e9ec69aad7cf6285df0394f25fe1815",
"ref": "refs/heads/main"
}
}
2 changes: 1 addition & 1 deletion pylib/ic_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@ def canister_version(agent: Agent, canister_principal: str) -> str:

if __name__ == "__main__":
# One can run some simple one-off tests here, e.g.:
ic_admin = IcAdmin("https://ic0.app", git_revision="a700085f0575a440cb44941da69cfa2efeea3ab9")
ic_admin = IcAdmin("https://ic0.app", git_revision="ac71086bf4d6854e8612d21f8104ba839283dc48")

print(ic_admin.get_subnet_replica_versions())
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ crossbeam-channel = { workspace = true }
crossbeam = { workspace = true }
futures-util = { workspace = true }
humantime = { workspace = true }
ic-async-utils = { workspace = true }
multiservice-discovery-shared = { path = "../multiservice-discovery-shared" }
regex = { workspace = true }
reqwest = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use clap::{ArgAction, Parser, Subcommand};
use downloader_loop::run_downloader_loop;
use futures_util::FutureExt;
use humantime::parse_duration;
use ic_async_utils::shutdown_signal;
use regex::Regex;
use service_discovery::shutdown_signal;
use slog::{info, o, Drain, Logger};
use tokio::runtime::Runtime;
use url::Url;
Expand Down
7 changes: 3 additions & 4 deletions rs/ic-observability/multiservice-discovery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ crossbeam = { workspace = true }
crossbeam-channel = { workspace = true }
futures-util = { workspace = true }
humantime = { workspace = true }
ic-async-utils = { workspace = true }
ic-crypto-utils-threshold-sig-der = { workspace = true }
ic-registry-client = { workspace = true }
ic-management-types = { workspace = true }
Expand All @@ -36,6 +35,6 @@ retry = { workspace = true }
[dev-dependencies]
tempfile = { workspace = true }
reqwest = { workspace = true }
assert_cmd = "2.0.16"
anyhow = "1.0.94"
flate2 = "1.0.35"
assert_cmd = { workspace = true }
anyhow = { workspace = true }
flate2 = { workspace = true }
2 changes: 1 addition & 1 deletion rs/ic-observability/multiservice-discovery/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ use axum_otel_metrics::HttpMetricsLayerBuilder;
use clap::Parser;
use humantime::parse_duration;
use ic_management_types::Network;
use service_discovery::shutdown_signal;
use slog::{error, info, o, Drain, Logger};
use tokio::runtime::Runtime;
use tokio::sync::oneshot::{self};
use url::Url;

use definition::{Definition, DefinitionsSupervisor, StartMode};
use ic_async_utils::shutdown_signal;

use crate::definition::{RunningDefinition, TargetFilterSpec, TestDefinition};
use crate::metrics::{MSDMetrics, RunningDefinitionsMetrics};
Expand Down
1 change: 0 additions & 1 deletion rs/ic-observability/node-status-updater/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ crossbeam-channel = { workspace = true }
futures-util = { workspace = true }
humantime = { workspace = true }
ic-agent = { workspace = true }
ic-async-utils = { workspace = true }
ic-metrics = { workspace = true }
obs-canister-clients = { path = "../obs-canister-clients" }
prometheus-http-query = { workspace = true }
Expand Down
3 changes: 1 addition & 2 deletions rs/ic-observability/node-status-updater/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ use clap::Parser;
use futures_util::FutureExt;
use humantime::parse_duration;
use ic_agent::export::Principal;
use ic_async_utils::shutdown_signal;
use ic_metrics::MetricsRegistry;
use obs_canister_clients::node_status_canister_client::NodeStatusCanister;
use prometheus_http_query::Client;
use service_discovery::{metrics::Metrics, poll_loop::make_poll_loop, registry_sync::sync_local_registry, IcServiceDiscoveryImpl};
use service_discovery::{metrics::Metrics, poll_loop::make_poll_loop, registry_sync::sync_local_registry, shutdown_signal, IcServiceDiscoveryImpl};
use slog::{info, o, warn, Drain};
use std::{path::PathBuf, sync::Arc, time::Duration};
use url::Url;
Expand Down
1 change: 0 additions & 1 deletion rs/ic-observability/prometheus-config-updater/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ config-writer-common = { path = "../config-writer-common" }
crossbeam = { workspace = true }
futures-util = { workspace = true }
humantime = { workspace = true }
ic-async-utils = { workspace = true }
ic-config = { workspace = true }
ic-crypto-utils-threshold-sig-der = { workspace = true }
ic-http-endpoints-metrics = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion rs/ic-observability/prometheus-config-updater/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ use config_writer_common::config_writer::ConfigWriter;
use config_writer_common::filters::{NodeIDRegexFilter, TargetGroupFilter, TargetGroupFilterList};
use futures_util::FutureExt;
use humantime::parse_duration;
use ic_async_utils::shutdown_signal;
use ic_config::metrics::{Config as MetricsConfig, Exporter};
use ic_crypto_utils_threshold_sig_der::parse_threshold_sig_key_from_der;
use ic_http_endpoints_metrics::MetricsHttpEndpoint;
use ic_metrics::MetricsRegistry;
use regex::Regex;
use service_discovery::job_types::{JobType, NodeOS};
use service_discovery::registry_sync::sync_local_registry;
use service_discovery::shutdown_signal;
use service_discovery::{metrics::Metrics, poll_loop::make_poll_loop, IcServiceDiscoveryImpl};
use slog::{info, o, warn, Drain, Logger};
use url::Url;
Expand Down
16 changes: 16 additions & 0 deletions rs/ic-observability/service-discovery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ use ic_registry_local_registry::{LocalRegistry, LocalRegistryError};
use job_types::JobType;
use regex::Regex;
use serde::{Deserialize, Serialize};
use slog::info;
use slog::{warn, Logger};
use thiserror::Error;
use tokio::signal::unix::{signal, SignalKind};

pub mod file_sd;
pub mod job_types;
Expand Down Expand Up @@ -388,6 +390,20 @@ pub enum IcServiceDiscoveryError {
NotFoundInRegistry { information: String },
}

pub async fn shutdown_signal(log: Logger) {
let mut sig_int = signal(SignalKind::interrupt()).expect("failed to install SIGINT signal handler");
let mut sig_term = signal(SignalKind::terminate()).expect("failed to install SIGTERM signal handler");

tokio::select! {
_ = sig_int.recv() => {
info!(log, "Caught SIGINT");
}
_ = sig_term.recv() => {
info!(log, "Caught SIGTERM");
}
}
}

#[cfg(test)]
mod tests {
use std::collections::HashSet;
Expand Down
Loading

0 comments on commit 8797762

Please sign in to comment.