Repository navigation
fix(proxy): quote blob ETags consistently with local storage - #5072
Merged
milosgajdos merged 1 commit intoNov 11, 2026
Merged
Conversation
Member
|
@perfloop-agent please squash your commits. |
milosgajdos
approved these changes
Nov 11, 2026
A cold proxy GET returns an unquoted digest as its ETag. Reusing that validator after the blob is cached misses the local server entity tag and transfers the body again. Quote the digest in the proxy response header so the same validator works across the cold-to-warm transition without changing cache policy or Range forwarding. Replay an unchanged blob download through the proxy cache, then use the cold response validator for a conditional warm GET. Check full response bytes, lengths and digest headers as well as quoted ETag identity. Signed-off-by: Perfloop Agent <[email protected]> Signed-off-by: Tomás Senart <[email protected]> Signed-off-by: Tomás Senart <[email protected]>
perfloop
Bot
force-pushed
the
perfloop-pr-open-mncs1f521q
branch
from
November 11, 2026 12:48
b09e46d to
11575fc
Compare
milosgajdos
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quote the digest in the ETag returned by proxy blob copies, matching the local blob server’s strong entity tag. Previously, a client that reused the first download’s unquoted ETag in
If-None-Matchreceived the full unchanged blob after it entered the local cache. The same validator now produces a bodyless304 Not Modifiedresponse on the subsequent warm GET.registry/proxy/proxyblobstore_test.goadds a cold-to-warm regression test for empty, one-byte and 65-byte blobs. It reuses the cold validator verbatim, checks consistent quoted ETags, and verifies full-response bytes, content lengths and digest headers. A nonmatching validator still receives the full body.The change is confined to ETag formatting in the shared proxy-copy header helper. It applies to both cache-populating copies and direct copies while another download is in flight. It does not change cache policy, digest headers, copy dispatch or opt-in Range forwarding. Conditional handling on a cold cache miss is unchanged.
Go tests passed for the ETag round trip, concurrent and large blob downloads, proxy metrics and the existing Range pass-through cases. Scoped lint and commit validation passed.
AI assistance was used in preparing this change.
Case and evidence
Made by Perfloop. Human sponsor: Tomás Senart.