Watch
1
0
Fork
You've already forked pkg-proxy
1
mirror of https://github.com/git-pkgs/proxy.git synced 2026-11-09 15:49:16 -05:00
pkg-proxy/internal/scanner
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Simon Chrzanowski 2fed8901ae Send artifacts to the client while a cache miss is stored
On a cache miss the proxy stored the whole artifact before sending any of
it, so clients with an idle timeout gave up on large artifacts: git-lfs
after 30 seconds, pacman after 10. The caller that starts a shared fetch
now gets the bytes as they arrive while they are stored; requests joining
the fetch, HEAD and range requests still wait for the stored copy.

The client's copy is checked against the upstream's digest as it is read,
and a mismatch aborts the response before it completes. A client going
away leaves the copy to storage running. A storage error leaves the
client's copy running: the client gets the artifact, and the failure is
logged at error level and counted in proxy_artifacts_served_uncached_total.

A block-mode scanner has to see the whole artifact first, so with one
configured for the ecosystem a miss is handled as before.
2026-10-25 20:31:06 +01:00
..
group.go Send artifacts to the client while a cache miss is stored 2026-10-25 20:31:06 +01:00
group_test.go Send artifacts to the client while a cache miss is stored 2026-10-25 20:31:06 +01:00
http.go Add pre-cache artifact scanning hook (trivy/ClamAV/Wiz/custom) (#298) 2026-09-03 10:06:44 +01:00
http_test.go Add pre-cache artifact scanning hook (trivy/ClamAV/Wiz/custom) (#298) 2026-09-03 10:06:44 +01:00
scanner.go Add pre-cache artifact scanning hook (trivy/ClamAV/Wiz/custom) (#298) 2026-09-03 10:06:44 +01:00