From 4dfb07da8574d8c698faa4be38995e49c5c97cc7 Mon Sep 17 00:00:00 2001 From: John Millikin Date: Thu, 7 Jun 2018 04:16:50 -0700 Subject: [PATCH] Allow disabling the simple blob caches via CLI flag overrides. This fixes a regression from v0.13. When the local disk cache flags were unified into `--disk_cache`, it became impossible to override a default cache location such that the cache became disabled. This prevents canarying of remote execution in the presence of a default bazelrc that enables the disk cache. Fixes #5308 Closes #5338. PiperOrigin-RevId: 199613922 --- .../devtools/build/lib/remote/SimpleBlobStoreFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreFactory.java b/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreFactory.java index 424a6886f41797..5ec307c683b49d 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreFactory.java +++ b/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreFactory.java @@ -74,7 +74,7 @@ public static boolean isRemoteCacheOptions(RemoteOptions options) { } public static boolean isDiskCache(RemoteOptions options) { - return options.diskCache != null; + return options.diskCache != null && !options.diskCache.isEmpty(); } private static boolean isRestUrlOptions(RemoteOptions options) {