Skip to content
Snippets Groups Projects
Commit 74828141 authored by Qinusty's avatar Qinusty
Browse files

cascache.py: Add push info detailing which remote is being pushed to

Work towards fixing issue #275
parent 153c3cc2
No related branches found
No related tags found
Loading
......@@ -258,10 +258,12 @@ class CASCache(ArtifactCache):
push_remotes = [r for r in self._remotes[project] if r.spec.push]
pushed = False
for remote in push_remotes:
remote.init()
element.info("Pushing {} -> {}".format(element._get_brief_display_key(), remote.spec.url))
try:
for ref in refs:
tree = self.resolve_ref(ref)
......@@ -275,7 +277,8 @@ class CASCache(ArtifactCache):
if response.digest.hash == tree.hash and response.digest.size_bytes == tree.size_bytes:
# ref is already on the server with the same tree
continue
element.info("Skipping {}, remote ({}) already has artifact cached".format(element._get_brief_display_key(), remote.spec.url))
continue
except grpc.RpcError as e:
if e.code() != grpc.StatusCode.NOT_FOUND:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment