feat(oci): debug-level blob cache hit/miss logging for observability (PSA-41) #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/psa-41-blob-cache-hit-miss-logging"
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?
Problem
The dunite-oci blob cache emitted no log line on a hit or miss; the only blob-cache output was the eviction warning. During the bunyip BUNYIP-35 e2e it was impossible to confirm from logs whether a re-pull was served from cache or refetched from upstream, so proving cache behaviour required a dead-upstream test.
Change
Two debug-level structured log lines in
get_or_fetch:oci blob cache hitwithdigest+size_bytes, when a stored row's on-disk file is present.oci blob cache miss, fetching from upstreamwithowner,name,digest, before the upstream fetch (also covers a stale row whose file was wiped).Debug level keeps production quiet at the default info level while making cache behaviour observable once
RUST_LOGis raised.Acceptance criteria
tracing::debug!).Tests
Adds a
tracing-testdev-dependency (workspace + dunite-oci).cache_hit_logs_at_debug_with_digestandcache_miss_logs_at_debug_with_digestcapture the events in-process and assert both the message and the digest are present. fmt + clippy -D warnings clean; fullcargo test --workspacegreen.#PSA-41