aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar Jakob Buchgraber <buchgr@google.com>2017-12-19 05:50:11 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-19 05:51:45 -0800
commit905e30721ad566c3a940afbec06d73b134d5f064 (patch)
tree5d82f18e94549764c0c4bc2162ba2a2093a88c6a /src/main/java
parent8d92cd83c3399d78825c5d9c7fe43c6e8990f38d (diff)
remote: Rename --remote_rest_cache to --remote_http_cache
Call it what it is. RELNOTES: --remote_rest_cache was renamed to --remote_http_cache. Both options keep working in this release, but --remote_rest_cache will be removed in the next release. Change-Id: I9e0b947f2184e0d543e7e19c5c33b6aa851d47d2 PiperOrigin-RevId: 179542826
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/README.md4
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java9
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreFactory.java4
3 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/README.md b/src/main/java/com/google/devtools/build/lib/remote/README.md
index 1f3a017f3d..74769401cb 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/README.md
+++ b/src/main/java/com/google/devtools/build/lib/remote/README.md
@@ -47,14 +47,14 @@ In order to enable remote caching in Bazel you'll need to specify some flags. We
```
build --spawn_strategy=remote --genrule_strategy=remote --strategy=Javac=remote --strategy=Closure=remote
-build --remote_rest_cache=http://replace-with-your.host:port
+build --remote_http_cache=http://replace-with-your.host:port
```
The above will enable remote caching but with sandboxing disabled. The support for sandboxing with remote caching is currently (as of 0.9.0) experimental, but works well in our experience.
```
build --experimental_remote_spawn_cache
-build --remote_rest_cache=http://replace-with-your.host:port
+build --remote_http_cache=http://replace-with-your.host:port
```
#### Customizing the Hash Function
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 93eb95cc88..4b257d7ac4 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
@@ -27,16 +27,17 @@ import com.google.protobuf.TextFormat.ParseException;
/** Options for remote execution and distributed caching. */
public final class RemoteOptions extends OptionsBase {
@Option(
- name = "remote_rest_cache",
+ name = "remote_http_cache",
+ oldName = "remote_rest_cache",
defaultValue = "null",
category = "remote",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
help =
- "A base URL for a RESTful cache server for storing build artifacts. "
- + "It has to support PUT, GET, and HEAD requests."
+ "A base URL of a HTTP caching service. Both http:// and https:// are supported. BLOBs are "
+ + "stored with PUT and retrieved with GET. See remote/README.md for more information."
)
- public String remoteRestCache;
+ public String remoteHttpCache;
@Option(
name = "remote_rest_cache_pool_size",
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 21c9ba7c90..ea7b81003e 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
@@ -36,7 +36,7 @@ public final class SimpleBlobStoreFactory {
public static SimpleBlobStore createRest(RemoteOptions options, Credentials creds)
throws IOException {
return new RestBlobStore(
- options.remoteRestCache, (int) TimeUnit.SECONDS.toMillis(options.remoteTimeout), creds);
+ options.remoteHttpCache, (int) TimeUnit.SECONDS.toMillis(options.remoteTimeout), creds);
}
public static SimpleBlobStore createLocalDisk(RemoteOptions options, Path workingDirectory)
@@ -68,6 +68,6 @@ public final class SimpleBlobStoreFactory {
}
private static boolean isRestUrlOptions(RemoteOptions options) {
- return options.remoteRestCache != null;
+ return options.remoteHttpCache != null;
}
}