From 06e1781a95f16bb4b1840fc50ae705b9cdb98b34 Mon Sep 17 00:00:00 2001 From: Googler Date: Tue, 20 Mar 2018 15:05:10 -0700 Subject: Bug fix to allow timeout errors for remote spawns. TESTED=unit RELNOTES: None PiperOrigin-RevId: 189818481 --- .../com/google/devtools/build/lib/actions/SpawnResult.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/actions') 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.)"; } -- cgit v1.2.3