aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
-rw-r--r--src/test/shell/bazel/BUILD4
-rwxr-xr-xsrc/test/shell/bazel/remote_execution_http_test.sh (renamed from src/test/shell/bazel/remote_execution_rest_test.sh)8
5 files changed, 15 insertions, 14 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;
}
}
diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD
index 91b0cf5603..7cc1f6fe4b 100644
--- a/src/test/shell/bazel/BUILD
+++ b/src/test/shell/bazel/BUILD
@@ -424,9 +424,9 @@ sh_test(
)
sh_test(
- name = "remote_execution_rest_test",
+ name = "remote_execution_http_test",
size = "large",
- srcs = ["remote_execution_rest_test.sh"],
+ srcs = ["remote_execution_http_test.sh"],
data = [
":test-deps",
"//src/tools/remote:worker",
diff --git a/src/test/shell/bazel/remote_execution_rest_test.sh b/src/test/shell/bazel/remote_execution_http_test.sh
index 17cbe3572e..8605bd3e5c 100755
--- a/src/test/shell/bazel/remote_execution_rest_test.sh
+++ b/src/test/shell/bazel/remote_execution_http_test.sh
@@ -59,7 +59,7 @@ function tear_down() {
rm -rf "${work_path}"
}
-function test_cc_binary_rest_cache() {
+function test_cc_binary_http_cache() {
mkdir -p a
cat > a/BUILD <<EOF
package(default_visibility = ["//visibility:public"])
@@ -79,7 +79,7 @@ EOF
bazel clean --expunge >& $TEST_log
bazel build \
--experimental_remote_spawn_cache=true \
- --remote_rest_cache=http://localhost:${hazelcast_port}/hazelcast/rest/maps \
+ --remote_http_cache=http://localhost:${hazelcast_port}/hazelcast/rest/maps \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote REST cache service"
diff bazel-bin/a/test ${TEST_TMPDIR}/test_expected \
@@ -93,7 +93,7 @@ EOF
fi
}
-function test_cc_binary_rest_cache_bad_server() {
+function test_cc_binary_http_cache_bad_server() {
mkdir -p a
cat > a/BUILD <<EOF
package(default_visibility = ["//visibility:public"])
@@ -113,7 +113,7 @@ EOF
bazel clean --expunge >& $TEST_log
bazel build \
--experimental_remote_spawn_cache=true \
- --remote_rest_cache=http://bad.hostname/bad/cache \
+ --remote_http_cache=http://bad.hostname/bad/cache \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote REST cache service"
diff bazel-bin/a/test ${TEST_TMPDIR}/test_expected \