From 90622718f66a2b4174fa11a3d660b6513a20d2f0 Mon Sep 17 00:00:00 2001 From: olaola Date: Tue, 17 Oct 2017 02:55:18 +0200 Subject: 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 --- .../com/google/devtools/build/lib/remote/RemoteSpawnRunner.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib') 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()); -- cgit v1.2.3