diff options
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java (renamed from src/main/java/com/google/devtools/build/lib/authandtls/GrpcUtils.java) | 60 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventservice/BazelBuildEventServiceModule.java | 6 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/remote/BUILD | 1 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java | 31 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreFactory.java | 16 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java | 136 | ||||
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java | 9 | ||||
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java | 4 | ||||
-rw-r--r-- | src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorker.java | 2 |
9 files changed, 162 insertions, 103 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/authandtls/GrpcUtils.java b/src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java index 5f1ff70c2d..63dda5014b 100644 --- a/src/main/java/com/google/devtools/build/lib/authandtls/GrpcUtils.java +++ b/src/main/java/com/google/devtools/build/lib/authandtls/GoogleAuthUtils.java @@ -14,6 +14,7 @@ package com.google.devtools.build.lib.authandtls; +import com.google.auth.Credentials; import com.google.auth.oauth2.GoogleCredentials; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; @@ -33,15 +34,13 @@ import java.io.IOException; import java.io.InputStream; import javax.annotation.Nullable; -/** - * Utility methods for using {@link AuthAndTLSOptions} with gRPC. - */ -public final class GrpcUtils { +/** Utility methods for using {@link AuthAndTLSOptions} with Google Cloud. */ +public final class GoogleAuthUtils { /** * Create a new gRPC {@link ManagedChannel}. * - * @throws IOException in case the channel can't be constructed. + * @throws IOException in case the channel can't be constructed. */ public static ManagedChannel newChannel(String target, AuthAndTLSOptions options) throws IOException { @@ -54,8 +53,7 @@ public final class GrpcUtils { try { NettyChannelBuilder builder = NettyChannelBuilder.forTarget(target) - .negotiationType( - options.tlsEnabled ? NegotiationType.TLS : NegotiationType.PLAINTEXT) + .negotiationType(options.tlsEnabled ? NegotiationType.TLS : NegotiationType.PLAINTEXT) .loadBalancerFactory(RoundRobinLoadBalancerFactory.getInstance()); if (sslContext != null) { builder.sslContext(sslContext); @@ -77,8 +75,7 @@ public final class GrpcUtils { try { return GrpcSslContexts.forClient().build(); } catch (Exception e) { - String message = "Failed to init TLS infrastructure: " - + e.getMessage(); + String message = "Failed to init TLS infrastructure: " + e.getMessage(); throw new IOException(message, e); } } else { @@ -95,9 +92,32 @@ public final class GrpcUtils { /** * Create a new {@link CallCredentials} object. * - * @throws IOException in case the call credentials can't be constructed. + * @throws IOException in case the call credentials can't be constructed. */ public static CallCredentials newCallCredentials(AuthAndTLSOptions options) throws IOException { + Credentials creds = newCredentials(options); + if (creds != null) { + return MoreCallCredentials.from(creds); + } + return null; + } + + @VisibleForTesting + public static CallCredentials newCallCredentials( + @Nullable InputStream credentialsFile, @Nullable String authScope) throws IOException { + Credentials creds = newCredentials(credentialsFile, authScope); + if (creds != null) { + return MoreCallCredentials.from(creds); + } + return null; + } + + /** + * Create a new {@link Credentials} object. + * + * @throws IOException in case the credentials can't be constructed. + */ + public static Credentials newCredentials(AuthAndTLSOptions options) throws IOException { if (!options.authEnabled) { return null; } @@ -105,20 +125,21 @@ public final class GrpcUtils { if (options.authCredentials != null) { // Credentials from file try (InputStream authFile = new FileInputStream(options.authCredentials)) { - return newCallCredentials(authFile, options.authScope); + return newCredentials(authFile, options.authScope); } catch (FileNotFoundException e) { - String message = String.format("Could not open auth credentials file '%s': %s", - options.authCredentials, e.getMessage()); + String message = + String.format( + "Could not open auth credentials file '%s': %s", + options.authCredentials, e.getMessage()); throw new IOException(message, e); } } // Google Application Default Credentials - return newCallCredentials(null, options.authScope); + return newCredentials(null, options.authScope); } - @VisibleForTesting - public static CallCredentials newCallCredentials(@Nullable InputStream credentialsFile, - @Nullable String authScope) throws IOException { + private static Credentials newCredentials( + @Nullable InputStream credentialsFile, @Nullable String authScope) throws IOException { try { GoogleCredentials creds = credentialsFile == null @@ -127,10 +148,9 @@ public final class GrpcUtils { if (authScope != null) { creds = creds.createScoped(ImmutableList.of(authScope)); } - return MoreCallCredentials.from(creds); + return creds; } catch (IOException e) { - String message = "Failed to init auth credentials: " - + e.getMessage(); + String message = "Failed to init auth credentials: " + e.getMessage(); throw new IOException(message, e); } } diff --git a/src/main/java/com/google/devtools/build/lib/buildeventservice/BazelBuildEventServiceModule.java b/src/main/java/com/google/devtools/build/lib/buildeventservice/BazelBuildEventServiceModule.java index 4f205e1189..9fe84a723f 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventservice/BazelBuildEventServiceModule.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventservice/BazelBuildEventServiceModule.java @@ -16,7 +16,7 @@ package com.google.devtools.build.lib.buildeventservice; import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.authandtls.AuthAndTLSOptions; -import com.google.devtools.build.lib.authandtls.GrpcUtils; +import com.google.devtools.build.lib.authandtls.GoogleAuthUtils; import com.google.devtools.build.lib.buildeventservice.client.BuildEventServiceClient; import com.google.devtools.build.lib.buildeventservice.client.BuildEventServiceGrpcClient; import java.io.IOException; @@ -37,8 +37,8 @@ public class BazelBuildEventServiceModule protected BuildEventServiceClient createBesClient(BuildEventServiceOptions besOptions, AuthAndTLSOptions authAndTLSOptions) throws IOException { return new BuildEventServiceGrpcClient( - GrpcUtils.newChannel(besOptions.besBackend, authAndTLSOptions), - GrpcUtils.newCallCredentials(authAndTLSOptions)); + GoogleAuthUtils.newChannel(besOptions.besBackend, authAndTLSOptions), + GoogleAuthUtils.newCallCredentials(authAndTLSOptions)); } @Override diff --git a/src/main/java/com/google/devtools/build/lib/remote/BUILD b/src/main/java/com/google/devtools/build/lib/remote/BUILD index e7290e27bf..8ac275eea1 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/BUILD +++ b/src/main/java/com/google/devtools/build/lib/remote/BUILD @@ -32,6 +32,7 @@ java_library( "//src/main/java/com/google/devtools/common/options", "//third_party:apache_httpclient", "//third_party:apache_httpcore", + "//third_party:api_client", "//third_party:auth", "//third_party:gson", "//third_party:guava", diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java index 8928142626..2cd122227b 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java +++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java @@ -17,7 +17,7 @@ package com.google.devtools.build.lib.remote; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.authandtls.AuthAndTLSOptions; -import com.google.devtools.build.lib.authandtls.GrpcUtils; +import com.google.devtools.build.lib.authandtls.GoogleAuthUtils; import com.google.devtools.build.lib.buildeventstream.PathConverter; import com.google.devtools.build.lib.buildtool.BuildRequest; import com.google.devtools.build.lib.events.Event; @@ -33,7 +33,6 @@ import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.common.options.OptionsBase; import com.google.devtools.common.options.OptionsProvider; import com.google.devtools.remoteexecution.v1test.Digest; -import io.grpc.CallCredentials; import io.grpc.Channel; import java.io.IOException; import java.util.logging.Logger; @@ -109,7 +108,6 @@ public final class RemoteModule extends BlazeModule { return; } - try { boolean remoteOrLocalCache = SimpleBlobStoreFactory.isRemoteCacheOptions(remoteOptions); boolean grpcCache = GrpcRemoteCache.isRemoteCacheOptions(remoteOptions); @@ -117,31 +115,40 @@ public final class RemoteModule extends BlazeModule { RemoteRetrier retrier = new RemoteRetrier( remoteOptions, RemoteRetrier.RETRIABLE_GRPC_ERRORS, Retrier.ALLOW_ALL_CALLS); - CallCredentials creds = GrpcUtils.newCallCredentials(authAndTlsOptions); // TODO(davido): The naming is wrong here. "Remote"-prefix in RemoteActionCache class has no // meaning. final RemoteActionCache cache; if (remoteOrLocalCache) { cache = new SimpleBlobStoreActionCache( - SimpleBlobStoreFactory.create(remoteOptions, env.getWorkingDirectory()), + SimpleBlobStoreFactory.create( + remoteOptions, + GoogleAuthUtils.newCredentials(authAndTlsOptions), + env.getWorkingDirectory()), digestUtil); } else if (grpcCache || remoteOptions.remoteExecutor != null) { // If a remote executor but no remote cache is specified, assume both at the same target. String target = grpcCache ? remoteOptions.remoteCache : remoteOptions.remoteExecutor; - Channel ch = GrpcUtils.newChannel(target, authAndTlsOptions); - cache = new GrpcRemoteCache(ch, creds, remoteOptions, retrier, digestUtil); + Channel ch = GoogleAuthUtils.newChannel(target, authAndTlsOptions); + cache = + new GrpcRemoteCache( + ch, + GoogleAuthUtils.newCallCredentials(authAndTlsOptions), + remoteOptions, + retrier, + digestUtil); } else { cache = null; } final GrpcRemoteExecutor executor; if (remoteOptions.remoteExecutor != null) { - executor = new GrpcRemoteExecutor( - GrpcUtils.newChannel(remoteOptions.remoteExecutor, authAndTlsOptions), - creds, - remoteOptions.remoteTimeout, - retrier); + executor = + new GrpcRemoteExecutor( + GoogleAuthUtils.newChannel(remoteOptions.remoteExecutor, authAndTlsOptions), + GoogleAuthUtils.newCallCredentials(authAndTlsOptions), + remoteOptions.remoteTimeout, + retrier); } else { executor = null; } 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 15b600048e..af68d90991 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 @@ -16,6 +16,7 @@ package com.google.devtools.build.lib.remote; import static com.google.common.base.Preconditions.checkNotNull; +import com.google.auth.Credentials; import com.google.devtools.build.lib.remote.blobstore.OnDiskBlobStore; import com.google.devtools.build.lib.remote.blobstore.RestBlobStore; import com.google.devtools.build.lib.remote.blobstore.SimpleBlobStore; @@ -32,9 +33,13 @@ public final class SimpleBlobStoreFactory { private SimpleBlobStoreFactory() {} - public static SimpleBlobStore createRest(RemoteOptions options) throws IOException { - return new RestBlobStore(options.remoteRestCache, options.restCachePoolSize, - (int) TimeUnit.SECONDS.toMillis(options.remoteTimeout)); + public static SimpleBlobStore createRest(RemoteOptions options, Credentials creds) + throws IOException { + return new RestBlobStore( + options.remoteRestCache, + options.restCachePoolSize, + (int) TimeUnit.SECONDS.toMillis(options.remoteTimeout), + creds); } public static SimpleBlobStore createLocalDisk(RemoteOptions options, Path workingDirectory) @@ -43,10 +48,11 @@ public final class SimpleBlobStoreFactory { workingDirectory.getRelative(checkNotNull(options.experimentalLocalDiskCachePath))); } - public static SimpleBlobStore create(RemoteOptions options, @Nullable Path workingDirectory) + public static SimpleBlobStore create( + RemoteOptions options, @Nullable Credentials creds, @Nullable Path workingDirectory) throws IOException { if (isRestUrlOptions(options)) { - return createRest(options); + return createRest(options, creds); } if (workingDirectory != null && isLocalDiskCache(options)) { return createLocalDisk(options, workingDirectory); diff --git a/src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java b/src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java index e6f56971b0..6d7b46755e 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java +++ b/src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java @@ -13,21 +13,23 @@ // limitations under the License. package com.google.devtools.build.lib.remote.blobstore; +import com.google.api.client.http.ByteArrayContent; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.HttpRequestFactory; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.InputStreamContent; +import com.google.api.client.http.apache.ApacheHttpTransport; +import com.google.auth.Credentials; +import com.google.auth.http.HttpCredentialsAdapter; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URI; import java.net.URISyntaxException; -import org.apache.http.HttpEntity; +import javax.annotation.Nullable; import org.apache.http.HttpStatus; -import org.apache.http.client.HttpClient; import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpHead; -import org.apache.http.client.methods.HttpPut; -import org.apache.http.entity.ByteArrayEntity; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.InputStreamEntity; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; @@ -52,8 +54,9 @@ public final class RestBlobStore implements SimpleBlobStore { private static final String CAS_PREFIX = "cas"; private final String baseUrl; - private final PoolingHttpClientConnectionManager connMan; private final HttpClientBuilder clientFactory; + private final ApacheHttpTransport transport; + private final HttpRequestFactory requestFactory; /** * Creates a new instance. @@ -61,10 +64,11 @@ public final class RestBlobStore implements SimpleBlobStore { * @param baseUrl base URL for the remote cache * @param poolSize maximum number of simultaneous connections */ - public RestBlobStore(String baseUrl, int poolSize, int timeoutMillis) throws IOException { + public RestBlobStore(String baseUrl, int poolSize, int timeoutMillis, @Nullable Credentials creds) + throws IOException { validateUrl(baseUrl); this.baseUrl = baseUrl; - connMan = new PoolingHttpClientConnectionManager(); + PoolingHttpClientConnectionManager connMan = new PoolingHttpClientConnectionManager(); connMan.setDefaultMaxPerRoute(poolSize); connMan.setMaxTotal(poolSize); clientFactory = HttpClientBuilder.create(); @@ -76,23 +80,34 @@ public final class RestBlobStore implements SimpleBlobStore { // Timeout between reading data. .setSocketTimeout(timeoutMillis) .build()); + transport = new ApacheHttpTransport(clientFactory.build()); + if (creds != null) { + requestFactory = transport.createRequestFactory(new HttpCredentialsAdapter(creds)); + } else { + requestFactory = transport.createRequestFactory(); + } } @Override public void close() { - connMan.close(); + transport.shutdown(); } @Override public boolean containsKey(String key) throws IOException { - HttpClient client = clientFactory.build(); - HttpHead head = new HttpHead(baseUrl + "/" + CAS_PREFIX + "/" + key); - return client.execute( - head, - response -> { - int statusCode = response.getStatusLine().getStatusCode(); - return HttpStatus.SC_OK == statusCode; - }); + HttpResponse response = null; + try { + response = + requestFactory + .buildHeadRequest(new GenericUrl(baseUrl + "/" + CAS_PREFIX + "/" + key)) + .setThrowExceptionOnExecuteError(false) + .execute(); + return HttpStatus.SC_OK == response.getStatusCode(); + } finally { + if (response != null) { + response.disconnect(); + } + } } @Override @@ -107,53 +122,62 @@ public final class RestBlobStore implements SimpleBlobStore { } private boolean get(String urlPrefix, String key, OutputStream out) throws IOException { - HttpClient client = clientFactory.build(); - HttpGet get = new HttpGet(baseUrl + "/" + urlPrefix + "/" + key); - return client.execute( - get, - response -> { - int statusCode = response.getStatusLine().getStatusCode(); - if (HttpStatus.SC_NOT_FOUND == statusCode - || HttpStatus.SC_NO_CONTENT == statusCode) { - return false; - } - if (HttpStatus.SC_OK != statusCode) { - throw new IOException("GET failed with status code " + statusCode); - } - response.getEntity().writeTo(out); - return true; - }); + HttpResponse response = null; + try { + response = + requestFactory + .buildGetRequest(new GenericUrl(baseUrl + "/" + urlPrefix + "/" + key)) + .setThrowExceptionOnExecuteError(false) + .execute(); + int statusCode = response.getStatusCode(); + if (HttpStatus.SC_NOT_FOUND == statusCode || HttpStatus.SC_NO_CONTENT == statusCode) { + return false; + } + if (HttpStatus.SC_OK != statusCode) { + throw new IOException("GET failed with status code " + statusCode); + } + response.download(out); + return true; + } finally { + if (response != null) { + response.disconnect(); + } + } } @Override public void put(String key, long length, InputStream in) throws IOException { - put(CAS_PREFIX, key, new InputStreamEntity(in, length, ContentType.APPLICATION_OCTET_STREAM)); + put(CAS_PREFIX, key, new InputStreamContent("application/octext-stream", in)); } @Override public void putActionResult(String key, byte[] in) throws IOException, InterruptedException { - put(ACTION_CACHE_PREFIX, key, new ByteArrayEntity(in, ContentType.APPLICATION_OCTET_STREAM)); + put(ACTION_CACHE_PREFIX, key, new ByteArrayContent("application/octet-stream", in)); } - private void put(String urlPrefix, String key, HttpEntity entity) throws IOException { - HttpClient client = clientFactory.build(); - HttpPut put = new HttpPut(baseUrl + "/" + urlPrefix + "/" + key); - put.setEntity(entity); - client.execute( - put, - (response) -> { - int statusCode = response.getStatusLine().getStatusCode(); - // Accept more than SC_OK to be compatible with Nginx WebDav module. - if (HttpStatus.SC_OK != statusCode - && HttpStatus.SC_ACCEPTED != statusCode - && HttpStatus.SC_CREATED != statusCode - && HttpStatus.SC_NO_CONTENT != statusCode) { - throw new IOException("PUT failed with status code " + statusCode); - } - return null; - }); + private void put(String urlPrefix, String key, HttpContent content) throws IOException { + HttpResponse response = null; + try { + response = + requestFactory + .buildPutRequest(new GenericUrl(baseUrl + "/" + urlPrefix + "/" + key), content) + .setThrowExceptionOnExecuteError(false) + .execute(); + int statusCode = response.getStatusCode(); + // Accept more than SC_OK to be compatible with Nginx WebDav module. + if (HttpStatus.SC_OK != statusCode + && HttpStatus.SC_ACCEPTED != statusCode + && HttpStatus.SC_CREATED != statusCode + && HttpStatus.SC_NO_CONTENT != statusCode) { + throw new IOException("PUT failed with status code " + statusCode); + } + } finally { + if (response != null) { + response.disconnect(); + } + } } - + private void validateUrl(String url) throws IOException { try { new URI(url); diff --git a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java index d2c8d287c4..76a992ab16 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java @@ -28,7 +28,7 @@ import com.google.bytestream.ByteStreamProto.WriteResponse; import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.ActionInputHelper; import com.google.devtools.build.lib.authandtls.AuthAndTLSOptions; -import com.google.devtools.build.lib.authandtls.GrpcUtils; +import com.google.devtools.build.lib.authandtls.GoogleAuthUtils; import com.google.devtools.build.lib.clock.JavaClock; import com.google.devtools.build.lib.remote.DigestUtil.ActionKey; import com.google.devtools.build.lib.testutil.Scratch; @@ -148,9 +148,10 @@ public class GrpcRemoteCacheTest { Scratch scratch = new Scratch(); scratch.file(authTlsOptions.authCredentials, new JacksonFactory().toString(json)); - CallCredentials creds = GrpcUtils.newCallCredentials( - scratch.resolve(authTlsOptions.authCredentials).getInputStream(), - authTlsOptions.authScope); + CallCredentials creds = + GoogleAuthUtils.newCallCredentials( + scratch.resolve(authTlsOptions.authCredentials).getInputStream(), + authTlsOptions.authScope); RemoteOptions remoteOptions = Options.getDefaults(RemoteOptions.class); RemoteRetrier retrier = new RemoteRetrier( diff --git a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java index b6fcd830df..a19485005b 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java @@ -37,7 +37,7 @@ import com.google.devtools.build.lib.actions.SimpleSpawn; import com.google.devtools.build.lib.actions.SpawnResult; import com.google.devtools.build.lib.analysis.BlazeVersionInfo; import com.google.devtools.build.lib.authandtls.AuthAndTLSOptions; -import com.google.devtools.build.lib.authandtls.GrpcUtils; +import com.google.devtools.build.lib.authandtls.GoogleAuthUtils; import com.google.devtools.build.lib.clock.JavaClock; import com.google.devtools.build.lib.exec.SpawnExecException; import com.google.devtools.build.lib.exec.SpawnInputExpander; @@ -238,7 +238,7 @@ public class GrpcRemoteExecutionClientTest { GrpcRemoteExecutor executor = new GrpcRemoteExecutor(channel, null, options.remoteTimeout, retrier); CallCredentials creds = - GrpcUtils.newCallCredentials(Options.getDefaults(AuthAndTLSOptions.class)); + GoogleAuthUtils.newCallCredentials(Options.getDefaults(AuthAndTLSOptions.class)); GrpcRemoteCache remoteCache = new GrpcRemoteCache(channel, creds, options, retrier, DIGEST_UTIL); client = diff --git a/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorker.java b/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorker.java index b49df47f4e..8463bb0091 100644 --- a/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorker.java +++ b/src/tools/remote/src/main/java/com/google/devtools/build/remote/worker/RemoteWorker.java @@ -260,7 +260,7 @@ public final class RemoteWorker { // 3. Finally use a ConcurrentMap to back the blob store. final SimpleBlobStore blobStore; if (usingRemoteCache) { - blobStore = SimpleBlobStoreFactory.create(remoteOptions, null); + blobStore = SimpleBlobStoreFactory.create(remoteOptions, null, null); } else if (remoteWorkerOptions.casPath != null) { blobStore = new OnDiskBlobStore(fs.getPath(remoteWorkerOptions.casPath)); } else if (remoteWorkerOptions.hazelcastStandaloneListenPort != 0) { |