Current docker-compose setup fails to work properly
Context
If you clone the mainline of buildgrid, and run docker-compose up
, then once the system is up, you run a bazel build against the newly stood up system (grpc://localhost:50051
) then no action caching occurs.
This is because of a plethora of errors of the form:
cache_1 | buildgrid._exceptions.GrpcUninitializedError: Remote CAS backend used before gRPC initialization.
I would expect this to not happen, and for everything to work.
Task Description
Applying this patch fixes things for me, but I won't pretend to know if it's the right thing to do:
diff --git a/buildgrid/server/actioncache/caches/lru_cache.py b/buildgrid/server/actioncache/caches/lru_cache.py
index 31ca2ba..c0342f0 100644
--- a/buildgrid/server/actioncache/caches/lru_cache.py
+++ b/buildgrid/server/actioncache/caches/lru_cache.py
@@ -68,6 +68,9 @@ class LruActionCache(ActionCacheABC, ReferenceCache):
self.instance_name = None
+ def setup_grpc(self):
+ self._storage.setup_grpc()
+
def get_action_result(self, action_digest: Digest) -> ActionResult:
"""Retrieves the cached result for an Action.
Acceptance Criteria
This will be acceptably fixed if I can clone mainline, run docker-compose up --build
and then have things work with bazel et al. I'm not sure if you do integration tests against your mainline docker-compose files, but if not, perhaps you should.