diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java index f3a2baec314327..e8e324b7a035f4 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java +++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java @@ -60,7 +60,7 @@ public Iterable getActionContexts() { String buildRequestId = env.getBuildRequestId().toString(); String commandId = env.getCommandId().toString(); - if (remoteOptions.experimentalRemoteSpawnCache || remoteOptions.experimentalLocalDiskCache) { + if (remoteOptions.experimentalRemoteSpawnCache || remoteOptions.localDiskCache != null) { RemoteSpawnCache spawnCache = new RemoteSpawnCache( env.getExecRoot(), diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java index b60241d5c798f6..3ba0d00371fd03 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java +++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java @@ -190,19 +190,9 @@ public final class RemoteOptions extends OptionsBase { ) public boolean experimentalRemoteSpawnCache; - // TODO(davido): Find a better place for this and the next option. + // TODO(davido): Find a better place for this option. @Option( - name = "experimental_local_disk_cache", - defaultValue = "false", - category = "remote", - documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, - effectTags = {OptionEffectTag.UNKNOWN}, - help = "Whether to use the experimental local disk cache." - ) - public boolean experimentalLocalDiskCache; - - @Option( - name = "experimental_local_disk_cache_path", + name = "local_disk_cache", defaultValue = "null", category = "remote", documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, @@ -210,7 +200,7 @@ public final class RemoteOptions extends OptionsBase { converter = OptionsUtils.PathFragmentConverter.class, help = "A file path to a local disk cache." ) - public PathFragment experimentalLocalDiskCachePath; + public PathFragment localDiskCache; @Option( name = "experimental_guard_against_concurrent_changes", 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 70a323ffeb8ba7..4a9f7640fa5b6a 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 @@ -49,7 +49,7 @@ public static SimpleBlobStore createRest(RemoteOptions options, Credentials cred public static SimpleBlobStore createLocalDisk(RemoteOptions options, Path workingDirectory) throws IOException { return new OnDiskBlobStore( - workingDirectory.getRelative(checkNotNull(options.experimentalLocalDiskCachePath))); + workingDirectory.getRelative(checkNotNull(options.localDiskCache))); } public static SimpleBlobStore create( @@ -71,7 +71,7 @@ public static boolean isRemoteCacheOptions(RemoteOptions options) { } public static boolean isLocalDiskCache(RemoteOptions options) { - return options.experimentalLocalDiskCache; + return options.localDiskCache != null; } private static boolean isRestUrlOptions(RemoteOptions options) { diff --git a/src/test/shell/bazel/local_action_cache_test.sh b/src/test/shell/bazel/local_action_cache_test.sh index 60c9c4ecc1abf4..a1209d93984211 100755 --- a/src/test/shell/bazel/local_action_cache_test.sh +++ b/src/test/shell/bazel/local_action_cache_test.sh @@ -27,7 +27,7 @@ function test_local_action_cache() { local execution_file="${TEST_TMPDIR}/run.log" local input_file="foo.in" local output_file="bazel-genfiles/foo.txt" - local flags="--experimental_local_disk_cache_path=$cache --experimental_local_disk_cache" + local flags="--local_disk_cache=$cache" rm -rf $cache mkdir $cache