From b89efa7d404b29634c9428f002455088831386e0 Mon Sep 17 00:00:00 2001 From: Juan Leni Date: Thu, 27 Aug 2026 18:30:04 +0200 Subject: [PATCH 1/2] chore(release): prepare 0.16.1 --- Cargo.lock | 10 +++++----- Cargo.toml | 4 ++-- charts/kache-service/Chart.yaml | 4 ++-- crates/kache-core/Cargo.toml | 2 +- crates/kache-e2e/Cargo.toml | 2 +- crates/kache-proofs/Cargo.toml | 2 +- crates/kache-service/Cargo.toml | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 78dce6b0..457cc4c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2940,7 +2940,7 @@ dependencies = [ [[package]] name = "kache" -version = "0.16.0" +version = "0.16.1" dependencies = [ "anyhow", "assert_cmd", @@ -2991,7 +2991,7 @@ dependencies = [ [[package]] name = "kache-core" -version = "0.16.0" +version = "0.16.1" dependencies = [ "anyhow", "async-trait", @@ -3003,7 +3003,7 @@ dependencies = [ [[package]] name = "kache-e2e" -version = "0.16.0" +version = "0.16.1" dependencies = [ "anyhow", "chrono", @@ -3017,11 +3017,11 @@ dependencies = [ [[package]] name = "kache-proofs" -version = "0.0.0" +version = "0.16.1" [[package]] name = "kache-service" -version = "0.16.0" +version = "0.16.1" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index ef1779ea..df688040 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kache" -version = "0.16.0" +version = "0.16.1" edition = "2024" description = "Zero-copy, content-addressed build cache for Rust, C/C++ and more, with S3 and shared-filesystem remotes." license = "Apache-2.0" @@ -41,7 +41,7 @@ reqsign-aws-v4 = { version = "=3.3.0", default-features = false } reqsign-core = { version = "=3.3.1", default-features = false } # Direct dep so OpenDAL/reqwest can use ring without reintroducing aws-lc. rustls = { version = "0.23", default-features = false, features = ["ring"] } -kache-core = { version = "0.16.0", path = "crates/kache-core", default-features = false, features = ["planning"] } +kache-core = { version = "0.16.1", path = "crates/kache-core", default-features = false, features = ["planning"] } async-trait = "0.1" tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "process", "fs", "io-util", "net", "time", "signal", "sync"] } serde = { version = "1", features = ["derive"] } diff --git a/charts/kache-service/Chart.yaml b/charts/kache-service/Chart.yaml index 07f47d94..786f092c 100644 --- a/charts/kache-service/Chart.yaml +++ b/charts/kache-service/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: kache-service description: Advisory remote planner service for kache type: application -version: 0.16.0 -appVersion: "0.16.0" +version: 0.16.1 +appVersion: "0.16.1" keywords: - rust - cache diff --git a/crates/kache-core/Cargo.toml b/crates/kache-core/Cargo.toml index 22bcb1b9..3050cba5 100644 --- a/crates/kache-core/Cargo.toml +++ b/crates/kache-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kache-core" -version = "0.16.0" +version = "0.16.1" edition = "2024" description = "Core planner data structures and algorithms for kache." license = "Apache-2.0" diff --git a/crates/kache-e2e/Cargo.toml b/crates/kache-e2e/Cargo.toml index 77d4511b..07dc9ec6 100644 --- a/crates/kache-e2e/Cargo.toml +++ b/crates/kache-e2e/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kache-e2e" -version = "0.16.0" +version = "0.16.1" edition = "2024" license = "Apache-2.0" repository = "https://github.com/kunobi-ninja/kache" diff --git a/crates/kache-proofs/Cargo.toml b/crates/kache-proofs/Cargo.toml index da196778..79123692 100644 --- a/crates/kache-proofs/Cargo.toml +++ b/crates/kache-proofs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kache-proofs" -version = "0.0.0" +version = "0.16.1" publish = false edition = "2024" description = "Repository-only formal verification harnesses for kache." diff --git a/crates/kache-service/Cargo.toml b/crates/kache-service/Cargo.toml index 78b2166b..a13fd60c 100644 --- a/crates/kache-service/Cargo.toml +++ b/crates/kache-service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kache-service" -version = "0.16.0" +version = "0.16.1" edition = "2024" description = "Remote service shell for kache planner endpoints" license = "Apache-2.0" From c1e2bd83e3a87dc2309f456fd7a268ed8307cd7f Mon Sep 17 00:00:00 2001 From: Juan Leni Date: Thu, 27 Aug 2026 21:03:08 +0200 Subject: [PATCH 2/2] test(daemon): wait for the prefetch failure transfer event downloads_failed is bumped before the TransferEvent is pushed. The Windows CI run for 0.16.1 hit that race: 2070 tests passed and test_handle_prefetch_failure_records_v3_transfer_timestamps panicked on an empty recent_transfers deque. Poll for both the counter and the event, matching prefetch_import_failure_is_counted_as_failure. --- src/daemon.rs | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/src/daemon.rs b/src/daemon.rs index 89812aac..085056d9 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -14191,21 +14191,33 @@ mod tests { "prefetch dispatch is ok even if downloads fail: {resp:?}" ); - // Poll the failure counter; the download runs in the background. - let mut failed = false; - for _ in 0..100 { - if daemon - .transfer_counters - .downloads_failed - .load(Ordering::Relaxed) - >= 1 - { - failed = true; - break; + // The download runs in the background. downloads_failed is bumped + // before the TransferEvent is pushed, so waiting on the counter + // alone races on Windows. Wait for both, same as + // prefetch_import_failure_is_counted_as_failure. + let completed = tokio::time::timeout(Duration::from_secs(5), async { + loop { + let failed = daemon + .transfer_counters + .downloads_failed + .load(Ordering::Relaxed); + let has_event = daemon + .recent_transfers + .lock() + .unwrap_or_else(|poisoned| poisoned.into_inner()) + .back() + .is_some(); + if failed >= 1 && has_event { + break; + } + tokio::task::yield_now().await; } - tokio::time::sleep(Duration::from_millis(50)).await; - } - assert!(failed, "a garbage pack must record a failed download"); + }) + .await; + assert!( + completed.is_ok(), + "a garbage pack must record a failed download and a transfer event" + ); assert_v3_transfer_timestamps(&latest_transfer(&daemon)); // Nothing was imported. assert!(!config.store_dir().join(key).join("meta.json").exists());