From 1f92bb07d34993553dc4b2d375b14f25e581181b Mon Sep 17 00:00:00 2001 From: Damien Lachaume <135982616+dlachaume@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:53:54 +0200 Subject: [PATCH 1/3] fix: disable store pruning for genesis commands --- mithril-aggregator/src/dependency_injection/builder.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mithril-aggregator/src/dependency_injection/builder.rs b/mithril-aggregator/src/dependency_injection/builder.rs index 7a9ce67f483..01d0d7d0898 100644 --- a/mithril-aggregator/src/dependency_injection/builder.rs +++ b/mithril-aggregator/src/dependency_injection/builder.rs @@ -1451,6 +1451,9 @@ impl DependenciesBuilder { "Dependencies Builder can not get Cardano network while building genesis container" })?; + // Disable store pruning for genesis commands + self.configuration.store_retention_limit = None; + let dependencies = GenesisToolsDependency { network, ticker_service: self.get_ticker_service().await?, From 0dcc77e19b30b08169316521cd83732945c21178 Mon Sep 17 00:00:00 2001 From: Damien Lachaume <135982616+dlachaume@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:14:18 +0200 Subject: [PATCH 2/3] fix: enhance logs when error with bootstrap genesis in e2e --- .../mithril-end-to-end/src/mithril/aggregator.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs b/mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs index 73bf5937c4d..805a2c8016f 100644 --- a/mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs +++ b/mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs @@ -147,7 +147,8 @@ impl Aggregator { pub async fn bootstrap_genesis(&mut self) -> StdResult<()> { // Clone the command so we can alter it without affecting the original let mut command = self.command.clone(); - command.set_log_name("mithril-aggregator-genesis-bootstrap"); + let process_name = "mithril-aggregator-genesis-bootstrap"; + command.set_log_name(process_name); let exit_status = command .start(&["genesis".to_string(), "bootstrap".to_string()])? @@ -158,6 +159,8 @@ impl Aggregator { if exit_status.success() { Ok(()) } else { + self.command.tail_logs(Some(process_name), 40).await?; + Err(match exit_status.code() { Some(c) => { anyhow!("`mithril-aggregator genesis bootstrap` exited with code: {c}") From 6627cd1ec186afbc65fc92f009538ef325ae1b5b Mon Sep 17 00:00:00 2001 From: Damien Lachaume <135982616+dlachaume@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:16:07 +0200 Subject: [PATCH 3/3] chore: upgrade crate versions * mithril-aggregator from `0.5.78` to `0.5.79` * mithril-end-to-end from `0.4.38` to `0.4.39` --- Cargo.lock | 4 ++-- mithril-aggregator/Cargo.toml | 2 +- mithril-test-lab/mithril-end-to-end/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a6b1b61bbf..5456540aa3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3403,7 +3403,7 @@ dependencies = [ [[package]] name = "mithril-aggregator" -version = "0.5.78" +version = "0.5.79" dependencies = [ "anyhow", "async-trait", @@ -3630,7 +3630,7 @@ dependencies = [ [[package]] name = "mithril-end-to-end" -version = "0.4.38" +version = "0.4.39" dependencies = [ "anyhow", "async-recursion", diff --git a/mithril-aggregator/Cargo.toml b/mithril-aggregator/Cargo.toml index 7e7e094db63..da9bbd7afca 100644 --- a/mithril-aggregator/Cargo.toml +++ b/mithril-aggregator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mithril-aggregator" -version = "0.5.78" +version = "0.5.79" description = "A Mithril Aggregator server" authors = { workspace = true } edition = { workspace = true } diff --git a/mithril-test-lab/mithril-end-to-end/Cargo.toml b/mithril-test-lab/mithril-end-to-end/Cargo.toml index 7d714f04c8a..b34aaad2434 100644 --- a/mithril-test-lab/mithril-end-to-end/Cargo.toml +++ b/mithril-test-lab/mithril-end-to-end/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mithril-end-to-end" -version = "0.4.38" +version = "0.4.39" authors = { workspace = true } edition = { workspace = true } documentation = { workspace = true }