Skip to content

Commit

Permalink
Merge pull request #2038 from input-output-hk/ensemble/fix-clap-argum…
Browse files Browse the repository at this point in the history
…ents-always-override-config

Fix: `clap` arguments are always overriding configuration
  • Loading branch information
dlachaume authored Oct 22, 2024
2 parents ef8c283 + 8a6fb72 commit 17b4319
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion mithril-aggregator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-aggregator"
version = "0.5.85"
version = "0.5.86"
description = "A Mithril Aggregator server"
authors = { workspace = true }
edition = { workspace = true }
Expand Down
49 changes: 24 additions & 25 deletions mithril-aggregator/src/commands/serve_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,31 +87,30 @@ impl Source for ServeCommand {
),
);
}
result.insert(
"disable_digests_cache".to_string(),
Value::new(
Some(&namespace),
ValueKind::from(self.disable_digests_cache),
),
);
result.insert(
"reset_digests_cache".to_string(),
Value::new(Some(&namespace), ValueKind::from(self.reset_digests_cache)),
);
result.insert(
"allow_unparsable_block".to_string(),
Value::new(
Some(&namespace),
ValueKind::from(self.allow_unparsable_block),
),
);
result.insert(
"enable_metrics_server".to_string(),
Value::new(
Some(&namespace),
ValueKind::from(self.enable_metrics_server),
),
);
if self.disable_digests_cache {
result.insert(
"disable_digests_cache".to_string(),
Value::new(Some(&namespace), ValueKind::from(true)),
);
};
if self.reset_digests_cache {
result.insert(
"reset_digests_cache".to_string(),
Value::new(Some(&namespace), ValueKind::from(true)),
);
}
if self.allow_unparsable_block {
result.insert(
"allow_unparsable_block".to_string(),
Value::new(Some(&namespace), ValueKind::from(true)),
);
};
if self.enable_metrics_server {
result.insert(
"enable_metrics_server".to_string(),
Value::new(Some(&namespace), ValueKind::from(true)),
);
};
if let Some(metrics_server_ip) = self.metrics_server_ip.clone() {
result.insert(
"metrics_server_ip".to_string(),
Expand Down

0 comments on commit 17b4319

Please sign in to comment.