Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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"] }
Expand Down
4 changes: 2 additions & 2 deletions charts/kache-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/kache-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion crates/kache-e2e/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion crates/kache-proofs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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."
Expand Down
2 changes: 1 addition & 1 deletion crates/kache-service/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
40 changes: 26 additions & 14 deletions src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Loading