aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/remote/GrpcRemoteCache.java
diff options
context:
space:
mode:
authorGravatar buchgr <buchgr@google.com>2018-04-18 04:41:10 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-04-18 04:42:46 -0700
commitfa36d2f48965b127e8fd397348d16e991135bfb6 (patch)
treecfdce5e5301a5f93186478dc5ceaf0cbfffa01d8 /src/main/java/com/google/devtools/build/lib/remote/GrpcRemoteCache.java
parentf083e7623cd03e20ed216117c5ea8c8b4ec61948 (diff)
Automated rollback of commit 4465dae23de989f1452e93d0a88ac2a289103dd9.
*** Reason for rollback *** The no-cache tag is not respected (see b/77857812) and thus this breaks remote caching for all projects with symlink outputs. *** Original change description *** Only allow regular files and directories spawn outputs to be uploaded to a remote cache. The remote cache protocol only knows about regular files and directories. Currently, during action output upload, symlinks are resolved into regular files. This means cached "executions" of an action may have different output file types than the original execution, which can be a footgun. This CL bans symlinks from cachable spawn outputs and fixes http... *** PiperOrigin-RevId: 193338629
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/remote/GrpcRemoteCache.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/GrpcRemoteCache.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/GrpcRemoteCache.java b/src/main/java/com/google/devtools/build/lib/remote/GrpcRemoteCache.java
index a29d7d23c4..3f5a48176b 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/GrpcRemoteCache.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/GrpcRemoteCache.java
@@ -25,7 +25,6 @@ import com.google.common.collect.Iterables;
import com.google.common.util.concurrent.ListeningScheduledExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.devtools.build.lib.actions.ActionInput;
-import com.google.devtools.build.lib.actions.ExecException;
import com.google.devtools.build.lib.actions.MetadataProvider;
import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe;
import com.google.devtools.build.lib.remote.Retrier.RetryException;
@@ -241,7 +240,7 @@ public class GrpcRemoteCache extends AbstractRemoteActionCache {
Collection<Path> files,
FileOutErr outErr,
boolean uploadAction)
- throws ExecException, IOException, InterruptedException {
+ throws IOException, InterruptedException {
ActionResult.Builder result = ActionResult.newBuilder();
upload(execRoot, files, outErr, result);
if (!uploadAction) {
@@ -267,8 +266,8 @@ public class GrpcRemoteCache extends AbstractRemoteActionCache {
}
void upload(Path execRoot, Collection<Path> files, FileOutErr outErr, ActionResult.Builder result)
- throws ExecException, IOException, InterruptedException {
- UploadManifest manifest = new UploadManifest(digestUtil, result, execRoot);
+ throws IOException, InterruptedException {
+ UploadManifest manifest = new UploadManifest(result, execRoot);
manifest.addFiles(files);
List<Chunker> filesToUpload = new ArrayList<>();