Repository navigation
Upload download_file outputs to the CAS; closes #1571 - #1572
Open
vlad-ivanov-name wants to merge 1 commit into
Open
vlad-ivanov-name wants to merge 1 commit into
vlad-ivanov-name wants to merge 1 commit into
Conversation
Contributor
|
This pull request has been imported. If you are a Meta employee, you can view this in D125193316. (Because this pull request was imported automatically, there will not be any future comments.) |
vlad-ivanov-name
marked this pull request as ready for review
October 14, 2026 12:49
vlad-ivanov-name
force-pushed
the
vlad/upload-downloads-to-cas
branch
from
November 3, 2026 20:05
766a646 to
5806f06
Compare
What: - Add `[buck2] upload_downloads_to_cas` (default true). - After a download with a checksum of the CAS digest algorithm, upload the file to the CAS. - Skip the upload with `--no-remote-cache` unless `--write-to-cache-anyway` is set. - A failed upload is a quiet soft error. Why: - `download_file` probes the CAS for the declared checksum, but nothing stored a downloaded file there. - With the upload, other machines and remote workers get the file from the CAS instead of the origin.
vlad-ivanov-name
force-pushed
the
vlad/upload-downloads-to-cas
branch
from
November 4, 2026 21:17
5806f06 to
13c11d8
Compare
This branch has not been deployed
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.
What
[buck2] upload_downloads_to_cas(bool, defaulttrue).download_filefetched a file with a checksum of the CAS digest algorithm, upload the file to the CAS.--no-remote-cacheskips the upload unless--write-to-cache-anywayis set.Why
download_filealready probes the CAS for the declared checksum before it fetches the origin, but nothing stored a downloaded file there. The probe only hit when a remote action had used the file as an input. With the upload, every later machine and remote worker gets the file from the CAS instead of the origin server.Notes