You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:54:15 UTC
[buildstream] 06/10: _artifactcache.py: Handle BlobNotFound error
in pull()
This is an automated email from the ASF dual-hosted git repository.
not-in-ldap pushed a commit to branch juerg/public-data
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit a791e0a756684c2505f16f0d64537a59c9b90309
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Fri Mar 27 16:54:57 2020 +0100
_artifactcache.py: Handle BlobNotFound error in pull()
---
src/buildstream/_artifactcache.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/buildstream/_artifactcache.py b/src/buildstream/_artifactcache.py
index 4290e92..9b800ac 100644
--- a/src/buildstream/_artifactcache.py
+++ b/src/buildstream/_artifactcache.py
@@ -22,6 +22,7 @@ import os
import grpc
from ._basecache import BaseCache
+from ._cas.casremote import BlobNotFound
from ._exceptions import ArtifactError, CASError, CacheError, CASRemoteError, RemoteError
from ._protos.buildstream.v2 import buildstream_pb2, buildstream_pb2_grpc, artifact_pb2, artifact_pb2_grpc
@@ -310,6 +311,10 @@ class ArtifactCache(BaseCache):
return True
element.info("Remote ({}) does not have artifact {} cached".format(remote, display_key))
+ except BlobNotFound as e:
+ # Not all blobs are available on this remote
+ element.info("Remote cas ({}) does not have blob {} cached".format(remote, e.blob))
+ continue
except CASError as e:
element.warn("Could not pull from remote {}: {}".format(remote, e))
errors.append(e)