Skip to content

Commit

Permalink
fix(config): print config [fixes NET-796] (#2161)
Browse files Browse the repository at this point in the history
  • Loading branch information
gurinderu committed Mar 12, 2024
1 parent fe793fd commit c1d58b5
Show file tree
Hide file tree
Showing 31 changed files with 126 additions and 422 deletions.
266 changes: 59 additions & 207 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ maplit = "1.0.2"
log = "0.4.20"
tracing = { version = "0.1.40", default-features = false, features = ["log"] }
tracing-subscriber = "0.3.18"
console-subscriber = "0.2.0"
futures = "0.3.30"
thiserror = "1.0.56"
serde = "1.0.196"
toml = "0.5.11"
toml_edit = "0.22.6"
itertools = "0.12.1"
humantime-serde = "1.1.1"
cid = "0.11.0"
Expand Down
1 change: 0 additions & 1 deletion aquamarine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ edition = "2021"
[dependencies]
particle-protocol = { workspace = true }
particle-services = { workspace = true }
particle-builtins = { workspace = true }

now-millis = { workspace = true }
fluence-libp2p = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions aquamarine/src/plumber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ impl<RT: AquaRuntime, F: ParticleFunctionStatic> Plumber<RT, F> {
}
}

fn create_actor<'p, 'a>(
fn create_actor<'p>(
actors: &'p mut HashMap<ActorKey, Actor<RT, F>>,
plumber_params: PlumberParams<'p, F>,
actor_params: ActorParams<'a>,
actor_params: ActorParams<'_>,
) -> eyre::Result<&'p mut Actor<RT, F>> {
let entry = actors.entry(actor_params.key);
let actor = match entry {
Expand Down
1 change: 0 additions & 1 deletion connection-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ serde = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tokio-util = {workspace = true }
itertools = { workspace = true }

[dev-dependencies]
parking_lot = { workspace = true }
2 changes: 0 additions & 2 deletions crates/chain-listener/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ types = { workspace = true }
libipld = "0.16.0"

fluence-libp2p = { workspace = true }
tempfile = { workspace = true }
fs-utils = { workspace = true }
log-utils = { workspace = true }
futures = { workspace = true }
core-manager = { workspace = true }
ccp-rpc-client = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/chain-listener/src/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl ChainListener {

retry(ExponentialBackoff::default(), || async {
ccp_client
.realloc_utility_core(vec![utility_core])
.realloc_utility_cores(vec![utility_core])
.await
.map_err(|err| {
tracing::error!(target: "chain-listener", "Error reallocating utility core {utility_core} to CCP, error: {err}. Retrying...");
Expand Down
1 change: 0 additions & 1 deletion crates/cid-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ edition = "2021"
serde = { workspace = true }
libipld = "0.16.0"
bytes = "1.5.0"
base64 = { workspace = true }
quick-protobuf = "0.8.1"
eyre = { workspace = true }

Expand Down
2 changes: 0 additions & 2 deletions crates/core-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ num_cpus.workspace = true
parking_lot.workspace = true
thiserror.workspace = true
serde = { workspace = true, features = ["derive"] }
types.workspace = true
tracing.workspace = true
serde_with.workspace = true
tokio-stream.workspace = true
futures.workspace = true
rand = "0.8.5"
Expand Down
1 change: 0 additions & 1 deletion crates/fs-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = "0.1.0"
edition = "2021"

[dependencies]
rand = { workspace = true }
eyre = { workspace = true }
tokio = { workspace = true, features = ["fs"] }
tokio-stream = { workspace = true, features = ["fs"] }
Expand Down
1 change: 0 additions & 1 deletion crates/json-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ edition = "2021"
serde = { workspace = true }
serde_json = { workspace = true }
base64 = { workspace = true }
itertools = { workspace = true }
2 changes: 0 additions & 2 deletions crates/kademlia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ libp2p-metrics = { workspace = true, features = ["kad"] }
prometheus-client = { workspace = true }
multihash = { workspace = true }
once_cell = { workspace = true }

prost = "0.12.3"
smallvec = "1.13.1"
serde_json = { workspace = true }
log = { workspace = true }
Expand Down
5 changes: 1 addition & 4 deletions crates/libp2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@ futures = { workspace = true }
futures-util = { workspace = true }
tokio = { workspace = true, optional = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
bs58 = { workspace = true }

failure = "0.1.8"
base64 = { workspace = true }
log = { workspace = true }
rand = { workspace = true }

[dev-dependencies]
rand = { workspace = true }
serde_json = { workspace = true }
5 changes: 0 additions & 5 deletions crates/local-vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ authors = ["Fluence Labs"]
edition = "2021"

[dependencies]
ivalue-utils = { workspace = true }
particle-args = { workspace = true }
particle-protocol = { workspace = true }
particle-execution = { workspace = true }
Expand All @@ -15,13 +14,9 @@ fs-utils = { workspace = true }
aquamarine = { workspace = true }
air-interpreter-fs = { workspace = true }
fluence-keypair = { workspace = true }
tempfile = { workspace = true }

air-interpreter-wasm = { workspace = true }
avm-server = { workspace = true }

libp2p = { workspace = true }

fstrings = { workspace = true }
serde_json = { workspace = true }
parking_lot = { workspace = true }
Expand Down
2 changes: 0 additions & 2 deletions crates/log-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ edition = "2021"
log = { workspace = true }
tracing = { workspace = true, features = ["async-await", "log"] }
tracing-subscriber = { workspace = true, features = ["parking_lot", "env-filter"] }
console-subscriber = { workspace = true, features = ["parking_lot"] }
tracing-logfmt = "0.3.3"
4 changes: 0 additions & 4 deletions crates/log-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ pub fn enable_logs() {
enable_logs_for(LogSpec::default())
}

pub fn enable_console() {
console_subscriber::init();
}

pub struct LogSpec {
level: tracing::metadata::Level,
directives: Vec<Directive>,
Expand Down
3 changes: 0 additions & 3 deletions crates/particle-args/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ authors = ["Fluence Labs"]
edition = "2021"

[dependencies]
ivalue-utils = { workspace = true }
json-utils = { workspace = true }
control-macro = { workspace = true }

avm-server = { workspace = true }

serde_json = { workspace = true }
serde = { workspace = true }
bs58 = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions crates/server-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ serde_with = { workspace = true }
config = { version = "0.13.4", default-features = false, features = ["toml"] }
clarity = { workspace = true }
maplit = { workspace = true }
url = { version = "2.4.1", features = ["serde"] }

[dev-dependencies]
temp-env = "0.3.6"
Expand Down
16 changes: 0 additions & 16 deletions crates/server-config/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

use crate::system_services_config::ServiceKey;
use crate::LogFormat;
use clap::error::ErrorKind;
use clap::{Args, Parser};
use config::{ConfigError, Map, Source, Value};
Expand Down Expand Up @@ -108,18 +107,6 @@ impl Serialize for RootKeyPairArgs {
}
}

#[derive(Args, Debug, Clone, Serialize)]
pub struct LogArgs {
#[arg(
long("log-format"),
id = "LOG_FORMAT",
help = "logging format",
help_heading = "Node configuration",
display_order = 24
)]
pub format: Option<LogFormat>,
}

#[derive(Args, Debug, Clone, Serialize)]
pub struct TracingArgs {
#[arg(
Expand Down Expand Up @@ -448,9 +435,6 @@ pub(crate) struct DerivedArgs {
#[command(flatten)]
system_services: Option<SystemServicesArgs>,

#[command(flatten)]
log: Option<LogArgs>,

#[command(flatten)]
tracing: Option<TracingArgs>,

Expand Down
3 changes: 0 additions & 3 deletions crates/server-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ pub use bootstrap_config::BootstrapConfig;
pub use kademlia_config::KademliaConfig;
pub use network_config::NetworkConfig;
pub use node_config::{ChainConfig, ChainListenerConfig, NodeConfig, TransportConfig};
pub use resolved_config::ConsoleConfig;
pub use resolved_config::LogConfig;
pub use resolved_config::LogFormat;
pub use resolved_config::TracingConfig;
pub use resolved_config::{ResolvedConfig, UnresolvedConfig};
pub use services_config::ServicesConfig;
Expand Down
Loading

0 comments on commit c1d58b5

Please sign in to comment.