aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
diff options
context:
space:
mode:
authorGravatar olaola <olaola@google.com>2017-10-17 02:55:18 +0200
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-10-18 10:28:01 +0200
commit90622718f66a2b4174fa11a3d660b6513a20d2f0 (patch)
tree79920e59c6a96be6b5a9d5c10e72e6f5cc2c8594 /src/main/java/com/google/devtools/build/lib
parent9660ea09783f8d502270042047f4b45e5de10ed8 (diff)
Removing local fallback on failed action commands.
We should only fall back if a remote execution error occurred, not if the command itself failed. TESTED=better unit tests RELNOTES: None PiperOrigin-RevId: 172406687
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
index dbfea08cd8..c8d6fb69d8 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
@@ -184,11 +184,6 @@ class RemoteSpawnRunner implements SpawnRunner {
return execLocallyOrFail(spawn, policy, inputMap, actionKey, uploadLocalResults, e);
}
- boolean executionFailed = result.getExitCode() != 0;
- if (options.remoteLocalFallback && executionFailed) {
- return execLocally(spawn, policy, inputMap, uploadLocalResults, remoteCache, actionKey);
- }
-
try {
return downloadRemoteResults(result, policy.getFileOutErr());
} catch (IOException e) {
@@ -216,7 +211,7 @@ class RemoteSpawnRunner implements SpawnRunner {
boolean uploadLocalResults,
IOException cause)
throws ExecException, InterruptedException, IOException {
- if (options.remoteLocalFallback) {
+ if (options.remoteLocalFallback && !(cause instanceof TimeoutException)) {
return execLocally(spawn, policy, inputMap, uploadLocalResults, remoteCache, actionKey);
}
return handleError(cause, policy.getFileOutErr());