Skip to content

Commit

Permalink
feat(prover): Move prover_autoscaler config into crate (#3222)
Browse files Browse the repository at this point in the history
## What ❔

Move prover_autoscaler config into crate.
Remove protobuf monstrosity.
Create kube client only in Agent.

<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->

## Why ❔

To simplify config management and allow using hashmaps directly in yaml
config.
Also this reduces number of used time crates to 2, reduces build time
and size.

Kube client was created for Scaler too, but was never used.

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [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
  • Loading branch information
yorik authored Nov 5, 2024
1 parent 7fadc04 commit 1b33b5e
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 436 deletions.
6 changes: 0 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ sqlx = "0.8.1"
static_assertions = "1.1"
structopt = "0.3.20"
strum = "0.26"
strum_macros = "0.26.4"
tempfile = "3.0.2"
test-casing = "0.1.2"
test-log = "0.2.15"
Expand Down
5 changes: 0 additions & 5 deletions core/lib/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,10 @@ zksync_concurrency.workspace = true
zksync_vlog = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }

url.workspace = true
anyhow.workspace = true
rand.workspace = true
secrecy.workspace = true
serde = { workspace = true, features = ["derive"] }
time = { workspace = true, features = ["serde-human-readable"] }
strum.workspace = true
strum_macros.workspace = true
vise.workspace = true

[dev-dependencies]
serde_json.workspace = true
Expand Down
1 change: 0 additions & 1 deletion core/lib/config/src/configs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ pub mod house_keeper;
pub mod object_store;
pub mod observability;
pub mod proof_data_handler;
pub mod prover_autoscaler;
pub mod prover_job_monitor;
pub mod pruning;
pub mod secrets;
Expand Down
6 changes: 4 additions & 2 deletions core/lib/config/src/configs/observability.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use serde::Deserialize;

/// Configuration for the essential observability stack, like
/// logging and sentry integration.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct ObservabilityConfig {
/// URL of the Sentry instance to send events to.
pub sentry_url: Option<String>,
Expand All @@ -15,7 +17,7 @@ pub struct ObservabilityConfig {
pub log_directives: Option<String>,
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct OpentelemetryConfig {
/// Enables export of span data of specified level (and above) using opentelemetry exporters.
pub level: String,
Expand Down
1 change: 0 additions & 1 deletion core/lib/protobuf_config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ rand.workspace = true
hex.workspace = true
secrecy.workspace = true
tracing.workspace = true
time.workspace = true

[build-dependencies]
zksync_protobuf_build.workspace = true
1 change: 0 additions & 1 deletion core/lib/protobuf_config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ mod observability;
mod proof_data_handler;
pub mod proto;
mod prover;
mod prover_autoscaler;
mod prover_job_monitor;
mod pruning;
mod secrets;
Expand Down
74 changes: 0 additions & 74 deletions core/lib/protobuf_config/src/proto/config/prover_autoscaler.proto

This file was deleted.

Loading

0 comments on commit 1b33b5e

Please sign in to comment.