From 1bfff0e007e2fb5a4b4b885cf5c69a5cd290888b Mon Sep 17 00:00:00 2001 From: Yury Akudovich Date: Fri, 8 Nov 2024 22:07:51 +0100 Subject: [PATCH] fix(prover): Remove unneeded dependencies, add default for graceful_shutdown_timeout (#3242) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ Remove unneeded dependencies. Add default for graceful_shutdown_timeout. ## Why ❔ ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. ref ZKD-1855 --- prover/Cargo.lock | 2 -- prover/crates/bin/prover_autoscaler/Cargo.toml | 2 -- prover/crates/bin/prover_autoscaler/src/config.rs | 5 ++++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/prover/Cargo.lock b/prover/Cargo.lock index 0a86a44f145..f119d4bd195 100644 --- a/prover/Cargo.lock +++ b/prover/Cargo.lock @@ -8395,9 +8395,7 @@ dependencies = [ "url", "vise", "zksync_config", - "zksync_core_leftovers", "zksync_prover_job_monitor", - "zksync_types", "zksync_utils", "zksync_vlog", ] diff --git a/prover/crates/bin/prover_autoscaler/Cargo.toml b/prover/crates/bin/prover_autoscaler/Cargo.toml index 88569aa87e9..4e66ecc2b0e 100644 --- a/prover/crates/bin/prover_autoscaler/Cargo.toml +++ b/prover/crates/bin/prover_autoscaler/Cargo.toml @@ -10,10 +10,8 @@ keywords.workspace = true categories.workspace = true [dependencies] -zksync_core_leftovers.workspace = true zksync_vlog.workspace = true zksync_utils.workspace = true -zksync_types.workspace = true zksync_config = { workspace = true, features = ["observability_ext"] } zksync_prover_job_monitor.workspace = true diff --git a/prover/crates/bin/prover_autoscaler/src/config.rs b/prover/crates/bin/prover_autoscaler/src/config.rs index 6729a5372d5..777ffe89fc9 100644 --- a/prover/crates/bin/prover_autoscaler/src/config.rs +++ b/prover/crates/bin/prover_autoscaler/src/config.rs @@ -11,7 +11,10 @@ use zksync_config::configs::ObservabilityConfig; #[derive(Debug, Clone, PartialEq, Deserialize)] pub struct ProverAutoscalerConfig { /// Amount of time ProverJobMonitor will wait all it's tasks to finish. - #[serde(with = "humantime_serde")] + #[serde( + with = "humantime_serde", + default = "ProverAutoscalerConfig::default_graceful_shutdown_timeout" + )] pub graceful_shutdown_timeout: Duration, pub agent_config: Option, pub scaler_config: Option,