You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2022/08/18 07:00:49 UTC
[buildstream] 02/02: _artifactcache.py: Remove unused functions pull_tree() and push_message()
This is an automated email from the ASF dual-hosted git repository.
tvb pushed a commit to branch tristan/artifact-cache-refactor
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 204bd82541d2e78a8e31faaead9abe1638a8e43a
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Thu Aug 18 15:59:45 2022 +0900
_artifactcache.py: Remove unused functions pull_tree() and push_message()
Fixes #781
---
src/buildstream/_artifactcache.py | 43 ---------------------------------------
1 file changed, 43 deletions(-)
diff --git a/src/buildstream/_artifactcache.py b/src/buildstream/_artifactcache.py
index 9c4b00341..b8559428b 100644
--- a/src/buildstream/_artifactcache.py
+++ b/src/buildstream/_artifactcache.py
@@ -222,49 +222,6 @@ class ArtifactCache(AssetCache):
return False
- # pull_tree():
- #
- # Pull a single Tree rather than an artifact.
- # Does not update local refs.
- #
- # Args:
- # project (Project): The current project
- # digest (Digest): The digest of the tree
- #
- def pull_tree(self, project, digest):
- _, storage_remotes = self.get_remotes(project.name, False)
- for remote in storage_remotes:
- digest = self.cas.pull_tree(remote, digest)
-
- if digest:
- # no need to pull from additional remotes
- return digest
-
- return None
-
- # push_message():
- #
- # Push the given protobuf message to all remotes.
- #
- # Args:
- # project (Project): The current project
- # message (Message): A protobuf message to push.
- #
- # Raises:
- # (ArtifactError): if there was an error
- #
- def push_message(self, project, message):
- _, push_remotes = self.get_remotes(project.name, True)
- if not push_remotes:
- raise ArtifactError(
- "push_message was called, but no remote artifact " + "servers are configured as push remotes."
- )
-
- for remote in push_remotes:
- message_digest = remote.push_message(message)
-
- return message_digest
-
# link_key():
#
# Add a key for an existing artifact.