aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2018-03-20 15:05:10 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-03-20 15:06:33 -0700
commit06e1781a95f16bb4b1840fc50ae705b9cdb98b34 (patch)
tree560329f98df50cb1d74271e00ede83906284ce88 /src/main/java/com/google/devtools/build/lib/actions
parent3b3c7cd679cd962994b559ea79b0d622b0bfbc5f (diff)
Bug fix to allow timeout errors for remote spawns.
TESTED=unit RELNOTES: None PiperOrigin-RevId: 189818481
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java b/src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java
index 4cfa9aa2f8..10b484305a 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java
@@ -324,12 +324,13 @@ public interface SpawnResult {
explanation += ". Note: Remote connection/protocol failed with: " + errorDetail;
}
if (status() == Status.TIMEOUT) {
- Preconditions.checkState(
- getWallTime().isPresent(), "SpawnAction timed out but wall time wasn't set");
- explanation +=
- String.format(
- " (failed due to timeout after %.2f seconds.)",
- getWallTime().get().toMillis() / 1000.0);
+ if (getWallTime().isPresent()) {
+ explanation += String.format(
+ " (failed due to timeout after %.2f seconds.)",
+ getWallTime().get().toMillis() / 1000.0);
+ } else {
+ explanation += " (failed due to timeout.)";
+ }
} else if (status() == Status.OUT_OF_MEMORY) {
explanation += " (Remote action was terminated due to Out of Memory.)";
}