summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan van Berkom <tristan@codethink.co.uk>2020-09-23 13:12:22 +0900
committerTristan van Berkom <tristan@codethink.co.uk>2020-10-27 18:15:54 +0900
commitff7a9579f06c8c06302d005aeea65179c3e1f9f6 (patch)
tree388075634a3ff93889c1c5e0fe38bbbd107ad7bf
parent553afa35810372ff61b4442ad8bbdec601caebde (diff)
downloadbuildstream-ff7a9579f06c8c06302d005aeea65179c3e1f9f6.tar.gz
_artifactcache.py: Use Element._get_display_key()
Instead of using Element._get_brief_display_key(), no need for that second accessor.
-rw-r--r--src/buildstream/_artifactcache.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/buildstream/_artifactcache.py b/src/buildstream/_artifactcache.py
index 3cd34070d..5ccdf8fd8 100644
--- a/src/buildstream/_artifactcache.py
+++ b/src/buildstream/_artifactcache.py
@@ -121,7 +121,7 @@ class ArtifactCache(AssetCache):
#
def push(self, element, artifact):
project = element._get_project()
- display_key = element._get_brief_display_key()
+ display_key = element._get_display_key()
index_remotes = [r for r in self._index_remotes[project] if r.push]
storage_remotes = [r for r in self._storage_remotes[project] if r.push]
@@ -135,15 +135,13 @@ class ArtifactCache(AssetCache):
# can perform file checks on their end
for remote in storage_remotes:
remote.init()
- element.status("Pushing data from artifact {} -> {}".format(display_key, remote))
+ element.status("Pushing data from artifact {} -> {}".format(display_key.brief, remote))
if self._push_artifact_blobs(artifact, artifact_digest, remote):
- element.info("Pushed data from artifact {} -> {}".format(display_key, remote))
+ element.info("Pushed data from artifact {} -> {}".format(display_key.brief, remote))
else:
element.info(
- "Remote ({}) already has all data of artifact {} cached".format(
- remote, element._get_brief_display_key()
- )
+ "Remote ({}) already has all data of artifact {} cached".format(remote, display_key.brief)
)
for remote in index_remotes:
@@ -154,9 +152,7 @@ class ArtifactCache(AssetCache):
element.info("Pushed artifact {} -> {}".format(display_key, remote))
pushed = True
else:
- element.info(
- "Remote ({}) already has artifact {} cached".format(remote, element._get_brief_display_key())
- )
+ element.info("Remote ({}) already has artifact {} cached".format(remote, display_key.brief))
return pushed