Fix no-remote-exec caching functionality
This commit addresses issue #9412 and provides all
instances of the RemoteSpawnStrategy with a RemoteSpawnCache
to ensure that the AbstractSpawnStrategy caching logic behaves
as expected for no-remote-exec actions.
This patch was written for 1.2.1 and adapted to latest master.
EDIT: Force pushed different changes 19/03/2020, see below for further discussion
EDIT: Rebased as of 28/04/20, unsure if 08efd761721 should be needed
Closes #10964.
PiperOrigin-RevId: 309943659
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
index 88023c1..4c3a617 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
@@ -314,7 +314,7 @@
}
private static boolean useRemoteCache(RemoteOptions options) {
- return !isNullOrEmpty(options.remoteCache);
+ return !isNullOrEmpty(options.remoteCache) || !isNullOrEmpty(options.remoteExecutor);
}
private static boolean useDiskCache(RemoteOptions options) {