diff --git a/backend/src/manager/health.rs b/backend/src/manager/health.rs index 909c4cfc5..1e801a440 100644 --- a/backend/src/manager/health.rs +++ b/backend/src/manager/health.rs @@ -1,6 +1,7 @@ use std::collections::BTreeMap; use std::sync::atomic::{AtomicBool, Ordering}; +use itertools::Itertools; use patch_db::{DbHandle, LockReceipt, LockType}; use tracing::instrument; @@ -111,6 +112,7 @@ pub async fn check( }; let health_results = if let Some(started) = started { + tracing::debug!("Checking health of {}", id); manifest .health_checks .check_all( @@ -129,6 +131,24 @@ pub async fn check( if !should_commit.load(Ordering::SeqCst) { return Ok(()); } + + if !health_results + .iter() + .any(|(_, res)| matches!(res, HealthCheckResult::Failure { .. })) + { + tracing::debug!("All health checks succeeded for {}", id); + } else { + tracing::debug!( + "Some health checks failed for {}: {}", + id, + health_results + .iter() + .filter(|(_, res)| matches!(res, HealthCheckResult::Failure { .. })) + .map(|(id, _)| &*id) + .join(", ") + ); + } + let current_dependents = { let mut checkpoint = tx.begin().await?; let receipts = HealthCheckStatusReceipt::new(&mut checkpoint, id).await?; @@ -153,9 +173,7 @@ pub async fn check( current_dependents }; - tracing::debug!("Checking health of {}", id); let receipts = crate::dependencies::BreakTransitiveReceipts::new(&mut tx).await?; - tracing::debug!("Got receipts {}", id); for (dependent, info) in (current_dependents).0.iter() { let failures: BTreeMap = health_results diff --git a/backend/src/procedure/docker.rs b/backend/src/procedure/docker.rs index 02ef3e69d..afd7ffb7a 100644 --- a/backend/src/procedure/docker.rs +++ b/backend/src/procedure/docker.rs @@ -226,7 +226,6 @@ impl DockerProcedure { let name = name.docker_name(); let name: Option<&str> = name.as_ref().map(|x| &**x); let mut cmd = tokio::process::Command::new("docker"); - tracing::debug!("{:?} is run", name); let container_name = Self::container_name(pkg_id, name); cmd.arg("run") .arg("--rm") @@ -408,7 +407,6 @@ impl DockerProcedure { let name: Option<&str> = name.as_deref(); let mut cmd = tokio::process::Command::new("docker"); - tracing::debug!("{:?} is exec", name); cmd.arg("exec"); cmd.args(self.docker_args_inject(pkg_id).await?);