Repository navigation
writes: never upload when cache uploads are disabled - #1680
Open
daandemeyer wants to merge 1 commit into
Open
daandemeyer wants to merge 1 commit into
daandemeyer wants to merge 1 commit into
Conversation
A build whose executor configuration has cache uploads disabled still uploads blobs to the CAS. When the low-pass filter for local work has no free permit, a write or a copy of a source file that the CAS lacks is uploaded instead of being made locally. If the CAS is read-only for readers, it returns PERMISSION_DENIED for every upload. Buck then makes the content locally anyway, but reports a write_action_cache_upload_failed or source_upload_failed soft error for each upload. For a write, the upload path only checks that the executor configuration has a write action cache. The write action cache exists whenever the remote cache can be read. A source copy is uploaded whenever the CAS presence check succeeds. Let's take the upload path only when the executor configuration publishes results, which is what WriteActionCache::populates() reports and what populate() already checks. Otherwise we make the content locally, as we do when a permit is free. We check populates() before the upload rather than in ReWriteActionCache::upload(). An error from upload() would still be reported as a soft error. Source copies don't go through the write action cache either. Signed-off-by: Daan De Meyer <daan@amutable.com>
Contributor
|
This pull request has been imported. If you are a Meta employee, you can view this in D135079155. (Because this pull request was imported automatically, there will not be any future comments.) |
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.
A build whose executor configuration has cache uploads disabled still
uploads blobs to the CAS. When the low-pass filter for local work has
no free permit, a write or a copy of a source file that the CAS lacks
is uploaded instead of being made locally. If the CAS is read-only for
readers, it returns PERMISSION_DENIED for every upload. Buck then makes
the content locally anyway, but reports a
write_action_cache_upload_failed or source_upload_failed soft error for
each upload.
For a write, the upload path only checks that the executor
configuration has a write action cache. The write action cache exists
whenever the remote cache can be read. A source copy is uploaded
whenever the CAS presence check succeeds.
Let's take the upload path only when the executor configuration
publishes results, which is what WriteActionCache::populates() reports
and what populate() already checks. Otherwise we make the content
locally, as we do when a permit is free.
We check populates() before the upload rather than in
ReWriteActionCache::upload(). An error from upload() would still be
reported as a soft error. Source copies don't go through the write
action cache either.