feat(deps): consume dunite PSA-36 (single-flight core + download Transport error class) (BUNYIP-44) #50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/bunyip-44-dunite-psa-36"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes BUNYIP-44. Consumes dunite PSA-36 (dunite PR #5), bringing bunyip from the PSA-35 pin (269ee30b) up to dunite main a35e84aa.
What the dunite update brings
dunite_core::services::SingleFlight<K, T, E>: a shared keyed single-flight executor. Both vertical caches (dunite-ociblob_cache, dunite-downloaddownload_cache) now run their fetches through it instead of each hand-rolling the mechanism. Failures are never cached; concurrent callers share the leader's result; removal is guarded by cell identity (Arc::ptr_eq) so a lagging waiter cannot evict a newer cohort's in-flight cell, and the guard runs on panic so a panicking fetch cannot leak a map entry.DownloadCacheError::Transport: dunite-download's error type is now total and class-preserving. Transport failures (connection refused, DNS, TLS, timeout, mid-stream drop) previously collapsed intoIoand round-tripped back misclassified, so a binary download against an unreachable Forgejo looked like a local filesystem error. This is the dunite-download twin of the dunite-oci bug PSA-35 fixed.tokio/sync; verticals enable what they need additively.Consumer-side change
bunyip-api/src/handlers/download.rspreviously mapped everyDownloadCacheErrorto a blanketAppError::upstream(502), so a genuine local Io/Store fault was reported as an upstream outage. It now classifies:Forgejo,Transport,ShaMismatch,SizeMismatchIo,StoreThis mirrors the three-way classification dunite-oci's
From<&BlobCacheError> for OciErroralready does on the registry side. No API breaks: the workspace builds clean against the reworkedBlobCacheinternals.Verification (rust-builder-glibc 1.94.1 container + live dev stack)
cargo build --workspace --all-targets: clean (no API breaks from the BlobCache/SingleFlight rework)cargo clippy --workspace --all-targets -- -D warnings: cleancargo fmt --all --check: cleancargo test --workspace --lib: 206 passed, 0 failedjust verify-ociagainst the live dev stack: full registry matrix PASS including the blob-cache second pull, which exercises the reworked dunite-ociBlobCache+ the sharedSingleFlightend to end.E2E note
The dead-upstream binary-download path (which would directly exercise the new
DownloadCacheError::Transport-> 502 classification) is not e2e-verified here for the same reason BUNYIP-35 flagged: there is no live release-backed binary product in the dev environment to pull a cache-miss asset from. The classification is covered by dunite's own regression test (upstream_unreachable_surfaces_as_transport_not_io), by the compile against the total error type, and by the handlermatches!change. The OCI blob path, which does have a live product, is the proxy for the single-flight rework and passes.Related
d8771c0: the previous consumer update this mirrors.