diff options
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/_artifactcache.py | 9 | ||||
-rw-r--r-- | src/buildstream/_cas/cascache.py | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/buildstream/_artifactcache.py b/src/buildstream/_artifactcache.py index de17ea7ac..4a502064f 100644 --- a/src/buildstream/_artifactcache.py +++ b/src/buildstream/_artifactcache.py @@ -469,15 +469,18 @@ class ArtifactCache(BaseCache): push_remotes = [r for r in self._remotes[project] if r.spec.push] - remote_missing_blobs_set = set() + remote_missing_blobs_list = [] for remote in push_remotes: remote.init() remote_missing_blobs = self.cas.remote_missing_blobs(remote, missing_blobs) - remote_missing_blobs_set.update(remote_missing_blobs) - return list(remote_missing_blobs_set) + for blob in remote_missing_blobs: + if blob not in remote_missing_blobs_list: + remote_missing_blobs_list.append(blob) + + return remote_missing_blobs_list ################################################ # Local Private Methods # diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py index 58527d4cb..434e71663 100644 --- a/src/buildstream/_cas/cascache.py +++ b/src/buildstream/_cas/cascache.py @@ -596,14 +596,14 @@ class CASCache(): # Determine which blobs are missing on the remote. # # Args: - # blobs (Digest): The directory digest + # blobs ([Digest]): List of directory digests to check # # Returns: List of missing Digest objects # def remote_missing_blobs(self, remote, blobs): missing_blobs = dict() # Limit size of FindMissingBlobs request - for required_blobs_group in _grouper(blobs, 512): + for required_blobs_group in _grouper(iter(blobs), 512): request = remote_execution_pb2.FindMissingBlobsRequest(instance_name=remote.spec.instance_name) for required_digest in required_blobs_group: |