question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: external dependency caching using remote gRPC protocol

See original GitHub issue

Description of the feature request:

As part of implementing a proof of concept of a distributed cache for Bazel builds (see mwitkow/bazel-distcache) it seems that the remote_protocol.proto CASService is not used for caching <output_dir>/external content.

The reason why we’re interested in building distacache is because we run Dockerized bazel builds (using Jenkins and Concourse), and we’d rather not share the output_dir verbatim.

Not having the external cachable is a massive problem for such a use case. We have quite a few git dependencies for rules_go since there are tons of external dependencies in Go, and quite a few Skylark rules are referenced this way. Moreover, we have quite a few Maven deps which would be cacheable easily.

There seems to already be a RepositoryCache implementation in Bazel that allows HttpDownloader and MavenDownloader to cache from local disk (using --experimental_repository_cache) as part of https://github.com/bazelbuild/bazel/issues/1752. I think it could rely on the CASService, as it even has the appropriate hashing methods.

The proposal: (a): Extend RepositoryCache to be able to use the CASService, by reusing RemoteActionCache. (b): Come up with a way to use RepositoryCache for GitRepos. Most likely split them up to be a ZIP that can be cached like http_archive. Most likely belongs in a separate ticket.

CCs: @ola-rozenfeld - for RemoteCache @jin - for RepositoryCache @kchodorow - since seems to be main stakeholder in #1752 @dinowernli - since he probably wants to be on this ticket anyway 😉

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:5
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
rockwotjcommented, Aug 6, 2019

Any updates here?

1reaction
rockwotjcommented, May 14, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Bazel's Remote Caching and Remote Execution Explained
When using an external cache, Bazel will augment it's output base with the action cache (AC) and content-addressable storage (CAS) of the ...
Read more >
Discussion "Remote Repository Cache" proposal
In our case, there is a fourth use case. We keep an internal mirror of external dependencies where the license has already been...
Read more >
Remote Caching - Bazel
Bazel supports remote caching via HTTP/1.1. The protocol is conceptually simple: Binary data (BLOB) is uploaded via PUT requests and downloaded via GET...
Read more >
Building scalable microservices with gRPC - Bugsnag
Caching and batching - Speed up requests by using a cache or batching requests. Most frameworks will not provide all these features, but...
Read more >
Provide and consume gRPC services on Open Liberty
The client is provided with stubs that define the same interfaces that are provided by the server, so the client application can invoke...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found