diff options
author | Jürg Billeter <j@bitron.ch> | 2020-10-26 20:03:36 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-12-04 16:29:06 +0100 |
commit | bded35e714acad2033181468a45657cf95083b1a (patch) | |
tree | 1be2a60e91371ce03dfcc0e35686abcea8e1f317 | |
parent | 87e93c1fc6a45c83823a541719f24e1aa8f92f56 (diff) | |
download | buildstream-bded35e714acad2033181468a45657cf95083b1a.tar.gz |
_sandboxremote.py: Drop unused output_files_required parameter
-rw-r--r-- | src/buildstream/sandbox/_sandboxremote.py | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/src/buildstream/sandbox/_sandboxremote.py b/src/buildstream/sandbox/_sandboxremote.py index 2ac159337..c1750b570 100644 --- a/src/buildstream/sandbox/_sandboxremote.py +++ b/src/buildstream/sandbox/_sandboxremote.py @@ -52,8 +52,6 @@ class SandboxRemote(SandboxREAPI): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self._output_files_required = kwargs.get("output_files_required", True) - config = kwargs["specs"] # This should be a RemoteExecutionSpec if config is None: return @@ -267,29 +265,16 @@ class SandboxRemote(SandboxREAPI): def _fetch_missing_blobs(self, vdir): context = self._get_context() - project = self._get_project() cascache = context.get_cascache() - artifactcache = context.artifactcache - # Fetch the file blobs if needed - if self._output_files_required or artifactcache.has_push_remotes(): - dir_digest = vdir._get_digest() - required_blobs = cascache.required_blobs_for_directory(dir_digest) + # Fetch the file blobs + dir_digest = vdir._get_digest() + required_blobs = cascache.required_blobs_for_directory(dir_digest) - local_missing_blobs = cascache.local_missing_blobs(required_blobs) - if local_missing_blobs: - if self._output_files_required: - # Fetch all blobs from Remote Execution CAS server - blobs_to_fetch = local_missing_blobs - else: - # Output files are not required in the local cache, - # however, artifact push remotes will need them. - # Only fetch blobs that are missing on one or multiple - # artifact servers. - blobs_to_fetch = artifactcache.find_missing_blobs(project, local_missing_blobs) - - with CASRemote(self.storage_remote_spec, cascache) as casremote: - cascache.fetch_blobs(casremote, blobs_to_fetch) + local_missing_blobs = cascache.local_missing_blobs(required_blobs) + if local_missing_blobs: + with CASRemote(self.storage_remote_spec, cascache) as casremote: + cascache.fetch_blobs(casremote, local_missing_blobs) def _execute_action(self, action, flags): stdout, stderr = self._get_output() |