aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar ulfjack <ulfjack@google.com>2017-05-29 17:43:04 +0200
committerGravatar László Csomor <laszlocsomor@google.com>2017-05-30 09:56:29 +0200
commit8c67e3e50f58780ed261289b1418e734a20bbb5a (patch)
treeb38f87bd346d022f1f2728fa9923c6293b7d4af4 /src/main
parent1cc7c0245770c120927f736c40fbe8988bb3c280 (diff)
Remote worker: skip non-existent files after action execution
Tests basically always finish with non-existent files, and this is not an error on the server side. Instead, the client (Bazel) checks whether all the files it expects are present. The test didn't catch this because it was silently falling back to local execution. Non-existent files were leading to an IOException, which caused the remote worker to log nothing, and silently return an error with no output. Log errors in the remote worker to make future debugging easier. Fixes #2887. PiperOrigin-RevId: 157400131
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCache.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCache.java b/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCache.java
index 3c0e136101..bb1ca512d5 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCache.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCache.java
@@ -122,6 +122,9 @@ public final class SimpleBlobStoreActionCache implements RemoteActionCache {
public void uploadAllResults(Path execRoot, Collection<Path> files, ActionResult.Builder result)
throws IOException, InterruptedException {
for (Path file : files) {
+ if (!file.exists()) {
+ continue;
+ }
if (file.isDirectory()) {
// TODO(olaola): to implement this for a directory, will need to create or pass a
// TreeNodeRepository to call uploadTree.