diff --git a/crates/keplor-server/src/server.rs b/crates/keplor-server/src/server.rs index b96ed77..401c406 100644 --- a/crates/keplor-server/src/server.rs +++ b/crates/keplor-server/src/server.rs @@ -301,7 +301,7 @@ impl PipelineServer { // Validate S3 connectivity at startup — fail fast on // bad credentials instead of discovering errors hours // later on the first archive cycle. - if let Err(e) = archiver.probe() { + if let Err(e) = archiver.probe().await { tracing::error!( error = %e, "S3 connectivity check failed — archival disabled. \ diff --git a/crates/keplor-store/src/archive.rs b/crates/keplor-store/src/archive.rs index 0bce70b..be26148 100644 --- a/crates/keplor-store/src/archive.rs +++ b/crates/keplor-store/src/archive.rs @@ -67,11 +67,11 @@ impl Archiver { /// Call at startup to fail fast on invalid credentials or /// unreachable endpoints instead of discovering errors hours /// later on the first archive cycle. - pub fn probe(&self) -> Result<(), StoreError> { + pub async fn probe(&self) -> Result<(), StoreError> { let probe_path = ObjPath::from(format!("{}/_probe", self.prefix)); // A HEAD on a non-existent key returns 404, not an auth error. // An auth failure returns 403. Both are valid S3 responses. - match tokio::runtime::Handle::current().block_on(self.client.head(&probe_path)) { + match self.client.head(&probe_path).await { Ok(_) => Ok(()), Err(object_store::Error::NotFound { .. }) => Ok(()), // 404 = reachable Err(e) => Err(StoreError::ArchiveS3(format!("probe failed: {e}"))),