mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 00:17:11 +00:00
refactor: migrate consumers off rustfs-common heal/scanner shims (#6623)
* refactor(ecstore): import heal/scanner contracts crates directly (backlog#1843) * refactor(heal): import heal/scanner contracts crates directly (backlog#1843) * refactor(lifecycle): import heal/scanner contracts crates directly (backlog#1843) * refactor(obs): import heal/scanner contracts crates directly (backlog#1843) * refactor(protos): import heal/scanner contracts crates directly (backlog#1843) * refactor(scanner): import heal/scanner contracts crates directly (backlog#1843) * refactor(rustfs): import heal/scanner contracts crates directly (backlog#1843)
This commit is contained in:
@@ -105,6 +105,8 @@ workspace = true
|
||||
hotpath.workspace = true
|
||||
rustfs-audit = { workspace = true }
|
||||
rustfs-common = { workspace = true }
|
||||
rustfs-heal-contracts = { workspace = true }
|
||||
rustfs-scanner-contracts = { workspace = true }
|
||||
rustfs-config = { workspace = true, features = ["observability"] }
|
||||
# NOTE: This dependency on rustfs-ecstore is a known architectural limitation.
|
||||
# The obs crate imports types from ecstore for metrics collection.
|
||||
|
||||
@@ -493,7 +493,7 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::metrics::report::report_metrics;
|
||||
use metrics_util::debugging::DebuggingRecorder;
|
||||
use rustfs_common::metrics::{Metric, Metrics};
|
||||
use rustfs_scanner_contracts::metrics::{Metric, Metrics};
|
||||
|
||||
fn prometheus_counter_name(name: &str) -> String {
|
||||
if name.ends_with("_total") {
|
||||
|
||||
@@ -37,16 +37,16 @@ use crate::metrics::{
|
||||
};
|
||||
use crate::node_identity::current_local_node_identity;
|
||||
use jiff::Timestamp;
|
||||
use rustfs_common::heal_channel::HealScanMode;
|
||||
use rustfs_common::metrics::{
|
||||
ScannerActiveBucketDriveSnapshot, ScannerBucketDriveResultSnapshot, ScannerMetricsReport, ScannerSourceWorkSnapshot,
|
||||
global_metrics,
|
||||
};
|
||||
use rustfs_heal_contracts::heal_channel::HealScanMode;
|
||||
use rustfs_io_metrics::internode_metrics::global_internode_metrics;
|
||||
use rustfs_io_metrics::{
|
||||
ProcessResourceSnapshot, ProcessSampler, ProcessStatusSnapshot, ProcessSystemSnapshot, s3_op_metrics_snapshot,
|
||||
snapshot_process_resource_and_system, snapshot_process_resource_and_system_with,
|
||||
};
|
||||
use rustfs_scanner_contracts::metrics::{
|
||||
ScannerActiveBucketDriveSnapshot, ScannerBucketDriveResultSnapshot, ScannerMetricsReport, ScannerSourceWorkSnapshot,
|
||||
global_metrics,
|
||||
};
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
sync::Arc,
|
||||
@@ -1667,7 +1667,7 @@ pub async fn collect_compression_cluster_stats() -> Option<CompressionClusterSta
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use rustfs_common::metrics::ScannerSourceWorkSnapshot;
|
||||
use rustfs_scanner_contracts::metrics::ScannerSourceWorkSnapshot;
|
||||
use std::io::{Read, Write};
|
||||
use std::net::{Shutdown, TcpListener, TcpStream};
|
||||
use std::thread;
|
||||
@@ -2122,7 +2122,7 @@ mod tests {
|
||||
#[test]
|
||||
fn ilm_detail_stats_keep_expiry_and_transition_results_separate() {
|
||||
let report = ScannerMetricsReport {
|
||||
lifecycle_expiry: rustfs_common::metrics::ScannerLifecycleExpirySnapshot {
|
||||
lifecycle_expiry: rustfs_scanner_contracts::metrics::ScannerLifecycleExpirySnapshot {
|
||||
current_queued: 2,
|
||||
current_active: 1,
|
||||
scanner_queued: 10,
|
||||
@@ -2130,7 +2130,7 @@ mod tests {
|
||||
delete_failed: 4,
|
||||
..Default::default()
|
||||
},
|
||||
lifecycle_transition: rustfs_common::metrics::ScannerLifecycleTransitionSnapshot {
|
||||
lifecycle_transition: rustfs_scanner_contracts::metrics::ScannerLifecycleTransitionSnapshot {
|
||||
current_queued: 5,
|
||||
current_active: 6,
|
||||
queue_full: 7,
|
||||
|
||||
Reference in New Issue
Block a user