Merge pull request 'update almost all dependencies to the last version' (#1316) from gwenlg/garage:maintenance_deps into main-v2

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1316
This commit is contained in:
Alex
2026-02-10 19:16:49 +00:00
13 changed files with 1105 additions and 530 deletions
Generated
+1007 -457
View File
File diff suppressed because it is too large Load Diff
+69 -42
View File
@@ -39,91 +39,109 @@ garage_web = { version = "2.2.0", path = "src/web" }
k2v-client = { version = "0.0.4", path = "src/k2v-client" }
# External crates from crates.io
arc-swap = "1.1"
arc-swap = "1.8"
argon2 = "0.5"
async-trait = "0.1.7"
async-trait = "0.1"
backtrace = "0.3"
base64 = "0.21"
base64 = "0.22"
blake2 = "0.10"
bytes = "1.0"
bytesize = "1.1"
bytes = "1.11"
bytesize = "2.3"
cfg-if = "1.0"
chrono = { version = "0.4", features = ["serde"] }
crc-fast = "1.6"
crc-fast = "1.9"
crypto-common = "0.1"
gethostname = "0.4"
git-version = "0.3.4"
gethostname = "1.1"
git-version = "0.3"
hex = "0.4"
hexdump = "0.1"
hmac = "0.12"
itertools = "0.12"
ipnet = "2.9.0"
lazy_static = "1.4"
itertools = "0.14"
ipnet = "2.11"
lazy_static = "1.5"
md-5 = "0.10"
mktemp = "0.5"
nix = { version = "0.29", default-features = false, features = ["fs"] }
nix = { version = "0.31", default-features = false, features = ["fs"] }
nom = "7.1"
parking_lot = "0.12"
parse_duration = "2.1"
paste = "1.0"
pin-project = "1.0.12"
pnet_datalink = "0.34"
rand = "0.8"
pin-project = "1.1"
pnet_datalink = "0.35"
rand = "0.9"
sha1 = "0.10"
sha2 = "0.10"
timeago = { version = "0.4", default-features = false }
timeago = { version = "0.5", default-features = false }
xxhash-rust = { version = "0.8", default-features = false, features = ["xxh3"] }
aes-gcm = { version = "0.10", features = ["aes", "stream"] }
sodiumoxide = { version = "0.2.5-0", package = "kuska-sodiumoxide" }
kuska-handshake = { version = "0.2.0", features = ["default", "async_std"] }
clap = { version = "4.1", features = ["derive", "env"] }
clap = { version = "4.5", features = ["derive", "env"] }
pretty_env_logger = "0.5"
structopt = { version = "0.3", default-features = false }
syslog-tracing = "0.3"
tracing = "0.1"
tracing-journald = "0.3.1"
tracing-journald = "0.3"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
heed = { version = "0.22", default-features = false, features = [] }
rusqlite = "0.37"
rusqlite = { version = "0.38", features = ["fallible_uint"] }
r2d2 = "0.8"
r2d2_sqlite = "0.31"
fjall = "2.4"
r2d2_sqlite = "0.32"
fjall = "2.11"
async-compression = { version = "0.4", features = ["tokio", "zstd"] }
zstd = { version = "0.13", default-features = false }
quick-xml = { version = "0.26", features = ["serialize"] }
rmp-serde = "1.1.2"
rmp-serde = "1.3"
serde = { version = "1.0", default-features = false, features = ["derive", "rc"] }
serde_bytes = "0.11"
serde_json = "1.0"
toml = { version = "0.8", default-features = false, features = ["parse"] }
utoipa = { version = "5.3.1", features = ["chrono"] }
toml = { version = "0.9", default-features = false, features = ["parse", "serde"] }
utoipa = { version = "5.4", features = ["chrono"] }
# newer version requires rust edition 2021
k8s-openapi = { version = "0.21", features = ["v1_24"] }
kube = { version = "0.88", default-features = false, features = ["runtime", "derive", "client", "rustls-tls"] }
schemars = "0.8"
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls-manual-roots", "json"] }
k8s-openapi = { version = "0.27", features = ["v1_35"] }
kube = { version = "3.0", default-features = false, features = [
"runtime",
"derive",
"client",
"rustls-tls",
] }
schemars = "1.2"
reqwest = { version = "0.13", default-features = false, features = [
"rustls",
"json",
] }
form_urlencoded = "1.0.0"
http = "1.0"
form_urlencoded = "1.2"
http = "1.4"
httpdate = "1.0"
http-range = "0.1"
http-body-util = "0.1"
hyper = { version = "1.0", default-features = false }
hyper = { version = "1.8", default-features = false }
hyper-util = { version = "0.1", features = ["full"] }
multer = "3.0"
percent-encoding = "2.2"
roxmltree = "0.19"
url = "2.3"
multer = "3.1"
percent-encoding = "2.3"
roxmltree = "0.21"
url = "2.5"
futures = "0.3"
futures-util = "0.3"
tokio = { version = "1.0", default-features = false, features = ["rt", "rt-multi-thread", "io-util", "net", "time", "macros", "sync", "signal", "fs"] }
tokio = { version = "1.49", default-features = false, features = [
"rt",
"rt-multi-thread",
"io-util",
"net",
"time",
"macros",
"sync",
"signal",
"fs",
] }
tokio-util = { version = "0.7", features = ["compat", "io"] }
tokio-stream = { version = "0.1", features = ["net"] }
@@ -134,18 +152,27 @@ opentelemetry-contrib = "0.9"
prometheus = "0.13"
# used by the k2v-client crate only
aws-sigv4 = { version = "1.1", default-features = false }
hyper-rustls = { version = "0.26", default-features = false, features = ["http1", "http2", "ring", "rustls-native-certs"] }
aws-sigv4 = { version = "1.3", default-features = false }
hyper-rustls = { version = "0.27", default-features = false, features = [
"http1",
"http2",
"ring",
"rustls-native-certs",
] }
log = "0.4"
thiserror = "2.0"
# ---- used only as build / dev dependencies ----
assert-json-diff = "2.0"
rustc_version = "0.4.0"
rustc_version = "0.4"
static_init = "1.0"
aws-smithy-runtime = { version = "1.8", default-features = false, features = ["tls-rustls"] }
aws-sdk-config = { version = "1.62", default-features = false }
aws-sdk-s3 = { version = "1.79", default-features = false, features = ["rt-tokio"] }
aws-smithy-runtime = { version = "1.9", default-features = false, features = [
"tls-rustls",
] }
aws-sdk-config = { version = "1.99", default-features = false }
aws-sdk-s3 = { version = "1.121", default-features = false, features = [
"rt-tokio",
] }
[profile.dev]
#lto = "thin" # disabled for now, adds 2-4 min to each CI build
+1 -1
View File
@@ -780,7 +780,7 @@ impl BlockManagerLocked {
assert!(to_delete.as_ref() != Some(&tgt_path));
let mut path_tmp = tgt_path.clone();
let tmp_extension = format!("tmp{}", hex::encode(thread_rng().gen::<[u8; 4]>()));
let tmp_extension = format!("tmp{}", hex::encode(rand::rng().random::<[u8; 4]>()));
path_tmp.set_extension(tmp_extension);
fs::create_dir_all(&directory).await?;
+1 -1
View File
@@ -248,7 +248,7 @@ fn randomize_next_scrub_run_time(timestamp: u64) -> u64 {
timestamp
+ SCRUB_INTERVAL
.saturating_add(Duration::from_secs(
rand::thread_rng().gen_range(0..3600 * 24 * 10),
rand::rng().random_range(0..3600 * 24 * 10),
))
.as_millis() as u64
}
+7 -11
View File
@@ -437,8 +437,8 @@ impl Cli {
let bs = bytesize::ByteSize::b(size);
tab.push(format!(
"Size:\t{} ({})",
bs.to_string_as(true),
bs.to_string_as(false)
bs.display().si(),
bs.display().iec()
));
tab.push(format!("Size (exact):\t{}", size));
if !ver.blocks.is_empty() {
@@ -488,11 +488,7 @@ fn print_bucket_info(bucket: &GetBucketInfoResponse) {
String::new(),
{
let size = bytesize::ByteSize::b(bucket.bytes as u64);
format!(
"Size:\t{} ({})",
size.to_string_as(true),
size.to_string_as(false)
)
format!("Size:\t{} ({})", size.display().si(), size.display().iec())
},
format!("Objects:\t{}", bucket.objects),
];
@@ -509,8 +505,8 @@ fn print_bucket_info(bucket: &GetBucketInfoResponse) {
bytesize::ByteSize::b(bucket.unfinished_multipart_upload_bytes as u64);
format!(
"Size of unfinished multipart uploads:\t{} ({})",
mpu_size.to_string_as(true),
mpu_size.to_string_as(false),
mpu_size.display().si(),
mpu_size.display().iec(),
)
},
]);
@@ -538,8 +534,8 @@ fn print_bucket_info(bucket: &GetBucketInfoResponse) {
let ms = bytesize::ByteSize::b(ms);
info.push(format!(
" maximum size:\t{} ({})",
ms.to_string_as(true),
ms.to_string_as(false)
ms.display().si(),
ms.display().iec()
));
}
if let Some(mo) = bucket.quotas.max_objects {
+2 -2
View File
@@ -313,7 +313,7 @@ To know the correct value of the new layout version, invoke `garage layout show`
pub fn capacity_string(v: Option<u64>) -> String {
match v {
Some(c) => ByteSize::b(c).to_string_as(false),
Some(c) => ByteSize::b(c).display().iec().to_string(),
None => "gateway".to_string(),
}
}
@@ -383,7 +383,7 @@ pub fn print_cluster_layout(layout: &GetClusterLayoutResponse, empty_msg: &str)
tags,
role.zone,
capacity_string(role.capacity),
ByteSize::b(usable_capacity).to_string_as(false),
ByteSize::b(usable_capacity).display().iec(),
(100.0 * usable_capacity as f32) / (capacity as f32)
));
} else {
+1 -1
View File
@@ -130,7 +130,7 @@ impl Worker for AutoSnapshotWorker {
async_snapshot_metadata(&self.garage).await?;
let rand_factor = 1f32 + thread_rng().gen::<f32>() / 5f32;
let rand_factor = 1f32 + rand::rng().random::<f32>() / 5f32;
self.next_snapshot = Instant::now() + self.snapshot_interval.mul_f32(rand_factor);
Ok(WorkerState::Idle)
+1 -1
View File
@@ -78,7 +78,7 @@ impl OrderTag {
/// let tag_2 = stream.order(2);
/// ```
pub fn stream() -> OrderTagStream {
OrderTagStream(thread_rng().gen())
OrderTagStream(rand::rng().random())
}
}
impl OrderTagStream {
+1 -1
View File
@@ -385,7 +385,7 @@ impl Crdt for LayoutStaging {
impl NodeRole {
pub fn capacity_string(&self) -> String {
match self.capacity {
Some(c) => ByteSize::b(c).to_string_as(false),
Some(c) => ByteSize::b(c).display().iec().to_string(),
None => "gateway".to_string(),
}
}
+12 -10
View File
@@ -359,13 +359,13 @@ impl LayoutVersion {
if old_assignment_opt.is_some() {
msg.push(format!(
"Optimal partition size: {} ({} in previous layout)",
ByteSize::b(partition_size).to_string_as(false),
ByteSize::b(self.partition_size).to_string_as(false)
ByteSize::b(partition_size).display().iec(),
ByteSize::b(self.partition_size).display().iec()
));
} else {
msg.push(format!(
"Optimal partition size: {}",
ByteSize::b(partition_size).to_string_as(false)
ByteSize::b(partition_size).display().iec()
));
}
// We write the partition size.
@@ -722,14 +722,16 @@ impl LayoutVersion {
let percent_cap = 100.0 * (used_cap as f32) / (total_cap as f32);
msg.push(format!(
"Usable capacity / total cluster capacity: {} / {} ({:.1} %)",
ByteSize::b(used_cap).to_string_as(false),
ByteSize::b(total_cap).to_string_as(false),
ByteSize::b(used_cap).display().iec(),
ByteSize::b(total_cap).display().iec(),
percent_cap
));
msg.push(format!(
"Effective capacity (replication factor {}): {}",
self.replication_factor,
ByteSize::b(used_cap / self.replication_factor as u64).to_string_as(false)
ByteSize::b(used_cap / self.replication_factor as u64)
.display()
.iec()
));
if percent_cap < 80. {
msg.push("".into());
@@ -838,8 +840,8 @@ impl LayoutVersion {
tags_n,
stored_partitions[*n],
new_partitions[*n],
ByteSize::b(total_cap_n).to_string_as(false),
ByteSize::b(available_cap_n).to_string_as(false),
ByteSize::b(total_cap_n).display().iec(),
ByteSize::b(available_cap_n).display().iec(),
(available_cap_n as f32) / (total_cap_n as f32) * 100.0,
));
}
@@ -849,8 +851,8 @@ impl LayoutVersion {
replicated_partitions,
stored_partitions_zone[z],
//new_partitions_zone[z],
ByteSize::b(total_cap_z).to_string_as(false),
ByteSize::b(available_cap_z).to_string_as(false),
ByteSize::b(total_cap_z).display().iec(),
ByteSize::b(available_cap_z).display().iec(),
percent_cap_z
));
table.push("".into());
+1 -1
View File
@@ -510,7 +510,7 @@ impl<F: TableSchema, R: TableReplication> SyncWorker<F, R> {
partitions.layout_version
);
partitions.partitions.shuffle(&mut thread_rng());
partitions.partitions.shuffle(&mut rand::rng());
self.todo = Some(partitions);
}
Err(e) => {
+1 -1
View File
@@ -151,7 +151,7 @@ pub fn fasthash(data: &[u8]) -> FastHash {
/// Generate a random 32 bytes UUID
pub fn gen_uuid() -> Uuid {
rand::thread_rng().gen::<[u8; 32]>().into()
rand::rng().random::<[u8; 32]>().into()
}
#[cfg(test)]
+1 -1
View File
@@ -59,5 +59,5 @@ where
// ----
pub fn gen_trace_id() -> TraceId {
rand::thread_rng().gen::<[u8; 16]>().into()
rand::rng().random::<[u8; 16]>().into()
}