diff --git a/rustfs/src/connect/diagnostics/health.rs b/rustfs/src/connect/diagnostics/health.rs index 6b399ebb2..2ecca390f 100644 --- a/rustfs/src/connect/diagnostics/health.rs +++ b/rustfs/src/connect/diagnostics/health.rs @@ -36,8 +36,8 @@ use zip::{CompressionMethod, ZipWriter, write::SimpleFileOptions}; use super::ProfileProvenance; use crate::connect::DeviceIdentity; -use crate::storage::storage_api::contract::admin::{DiskSetSelector, StorageAdminApi}; -use crate::storage::storage_api::{DiskInfoOptions, StorageDiskRpcExt}; +use crate::storage_api::connect::contract::admin::{DiskSetSelector, StorageAdminApi}; +use crate::storage_api::connect::{DiskInfoOptions, StorageDiskRpcExt}; pub const HEALTH_SCHEMA_VERSION: u16 = 1; pub const HEALTH_TOOL_ID: &str = "health.check"; @@ -642,7 +642,7 @@ fn flags_check(observation: &HealthSourceObservation, freshness: HealthFreshness Some(flags) if flags.iter().any(|flag| !ALLOWED_FLAGS.contains(&flag.as_str())) => { (HealthRuleOutcome::Unknown, "INVALID_EVIDENCE") } - Some(flags) if flags.is_empty() => (HealthRuleOutcome::Pass, "NO_COARSE_CONDITION_REPORTED"), + Some([]) => (HealthRuleOutcome::Pass, "NO_COARSE_CONDITION_REPORTED"), Some(_) => (HealthRuleOutcome::Fail, "COARSE_CONDITION_REPORTED"), None => (HealthRuleOutcome::Unknown, "EVIDENCE_MISSING"), }, diff --git a/rustfs/src/storage/storage_api.rs b/rustfs/src/storage/storage_api.rs index 165acfc57..c0900c56c 100644 --- a/rustfs/src/storage/storage_api.rs +++ b/rustfs/src/storage/storage_api.rs @@ -59,7 +59,7 @@ fn bucket_targets_metadata_lock_shard(bucket: &str) -> usize { pub(crate) mod contract { pub(crate) mod admin { - pub(crate) use super::super::storage_contracts::{DiskSetSelector, StorageAdminApi}; + pub(crate) use super::super::storage_contracts::StorageAdminApi; } pub(crate) mod bucket { diff --git a/rustfs/src/storage_api.rs b/rustfs/src/storage_api.rs index bb07d6c72..9b715f92a 100644 --- a/rustfs/src/storage_api.rs +++ b/rustfs/src/storage_api.rs @@ -242,6 +242,19 @@ pub(crate) mod server { } } +/// Storage surface of the connect diagnostics module +/// (`crate::connect::diagnostics`): disk info and admin API primitives used +/// by the health-check observation path. +pub(crate) mod connect { + pub(crate) mod contract { + pub(crate) mod admin { + pub(crate) use super::super::super::storage_contracts::{DiskSetSelector, StorageAdminApi}; + } + } + + pub(crate) use crate::storage::storage_api::{DiskInfoOptions, StorageDiskRpcExt}; +} + /// Storage surface of the site-replication service module /// (`crate::site_replication`, backlog#1840): bucket metadata, bucket /// targets, replication-config primitives, and the config-object lock