diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2018-09-14 15:52:42 +0100 |
---|---|---|
committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2018-09-14 15:52:42 +0100 |
commit | 37fe206420dfe6bbc7f572e4926a9bd09cae563e (patch) | |
tree | b4a377c0e602203192bae9ff5bcd16c07433edab | |
parent | c2af0d5108c333cafd877670e86f61c84238c8f9 (diff) | |
download | buildstream-danielsilverstone-ct/fix-654.tar.gz |
sandbox/_sandboxremote.py: Acquire CASCache via Platformdanielsilverstone-ct/fix-654
The SandboxRemote used to construct its own CASCache which was
considered dangerous. This patch replaces that with acquisition of
the cache via the Platform singleton, hopefully eliminating issues
from having more than one artifact cache object in a single process.
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-rw-r--r-- | buildstream/sandbox/_sandboxremote.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/sandbox/_sandboxremote.py b/buildstream/sandbox/_sandboxremote.py index 296b20351..71b413f3c 100644 --- a/buildstream/sandbox/_sandboxremote.py +++ b/buildstream/sandbox/_sandboxremote.py @@ -27,7 +27,7 @@ from . import Sandbox from ..storage._filebaseddirectory import FileBasedDirectory from ..storage._casbaseddirectory import CasBasedDirectory from .._protos.build.bazel.remote.execution.v2 import remote_execution_pb2, remote_execution_pb2_grpc -from .._artifactcache.cascache import CASCache +from .._platform import Platform class SandboxError(Exception): @@ -58,7 +58,7 @@ class SandboxRemote(Sandbox): def _get_cascache(self): if self.cascache is None: - self.cascache = CASCache(self._get_context()) + self.cascache = Platform.get_platform().artifactcache self.cascache.setup_remotes(use_config=True) return self.cascache |