Leave volatile qualifiers out of asset store digest#61
Merged
mortenmj merged 2 commits intobuildbarn:masterfrom Aug 14, 2025
Merged
Leave volatile qualifiers out of asset store digest#61mortenmj merged 2 commits intobuildbarn:masterfrom
mortenmj merged 2 commits intobuildbarn:masterfrom
Conversation
Member
|
Hey Andrew, could you please format your source files to keep CI happy? Thanks! |
Contributor
Author
Aha, yes done! |
Member
|
@mortenmj @tomcoldrick-ct PTAL! |
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.
Fixes #60
When the remote asset API is used with Bazel as a client, and
--experimental_remote_downloader_propagate_credentialsis provided, the bearer tokens are included as qualifiers, however since these change regularly and frequently, resources requiring auth not only rarely get cache hits, but also they result in identical copies of their resources populating the asset store cache.Fix by filtering out auth and http header qualifiers before sending the asset ref down to the asset store.
Note that I'm looking at this PR from my own personal narrow perspective and might be overlooking a subtle detail/requirement... Other solutions I can think of would be to make the digest based entirely on
checksum.sriif that qualifier is provided, being more specific to include onlyhttp_header_url:*:Authorizationinstead ofhttp_header_url:*qualifiers, or making this a configuration parameter.I've verified that this fixes my cache churn issues in my deployment.
Also apologies if I missed it but I couldn't find contribution instructions so feel free to point me to them if things need to be fixed up.