aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/remote
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/remote')
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/CachedLocalSpawnRunner.java7
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java7
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnStrategy.java7
3 files changed, 12 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/CachedLocalSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/remote/CachedLocalSpawnRunner.java
index 449b24c833..95a34042c3 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/CachedLocalSpawnRunner.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/CachedLocalSpawnRunner.java
@@ -96,8 +96,7 @@ final class CachedLocalSpawnRunner implements SpawnRunner {
spawn.getOutputFiles(),
Digests.computeDigest(command),
repository.getMerkleDigest(inputRoot),
- // TODO(olaola): set sensible local and remote timeouts.
- Spawns.getTimeoutSeconds(spawn, 120));
+ Spawns.getTimeoutSeconds(spawn));
// Look up action cache, and reuse the action output if it is found.
actionKey = Digests.computeActionKey(action);
@@ -147,7 +146,9 @@ final class CachedLocalSpawnRunner implements SpawnRunner {
if (platform != null) {
action.setPlatform(platform);
}
- action.setTimeout(Duration.newBuilder().setSeconds(timeoutSeconds));
+ if (timeoutSeconds > 0) {
+ action.setTimeout(Duration.newBuilder().setSeconds(timeoutSeconds));
+ }
return action.build();
}
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 46485771d4..4ec3610db0 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
@@ -98,8 +98,7 @@ final class RemoteSpawnRunner implements SpawnRunner {
spawn.getOutputFiles(),
Digests.computeDigest(command),
repository.getMerkleDigest(inputRoot),
- // TODO(olaola): set sensible local and remote timouts.
- Spawns.getTimeoutSeconds(spawn, 120));
+ Spawns.getTimeoutSeconds(spawn));
ActionKey actionKey = Digests.computeActionKey(action);
ActionResult result =
@@ -144,7 +143,9 @@ final class RemoteSpawnRunner implements SpawnRunner {
if (platform != null) {
action.setPlatform(platform);
}
- action.setTimeout(Duration.newBuilder().setSeconds(timeoutSeconds));
+ if (timeoutSeconds > 0) {
+ action.setTimeout(Duration.newBuilder().setSeconds(timeoutSeconds));
+ }
return action.build();
}
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnStrategy.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnStrategy.java
index 52cad13e21..871bc0cff5 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnStrategy.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnStrategy.java
@@ -148,7 +148,9 @@ final class RemoteSpawnStrategy implements SpawnActionContext {
if (platform != null) {
action.setPlatform(platform);
}
- action.setTimeout(Duration.newBuilder().setSeconds(timeoutSeconds));
+ if (timeoutSeconds > 0) {
+ action.setTimeout(Duration.newBuilder().setSeconds(timeoutSeconds));
+ }
return action.build();
}
@@ -247,8 +249,7 @@ final class RemoteSpawnStrategy implements SpawnActionContext {
spawn.getOutputFiles(),
Digests.computeDigest(command),
repository.getMerkleDigest(inputRoot),
- // TODO(olaola): set sensible local and remote timouts.
- Spawns.getTimeoutSeconds(spawn, 120));
+ Spawns.getTimeoutSeconds(spawn));
// Look up action cache, and reuse the action output if it is found.
actionKey = Digests.computeActionKey(action);