summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-03-27 16:54:57 +0100
committerJürg Billeter <j@bitron.ch>2020-04-20 14:27:16 +0200
commitd946255d0b94d8e52c56ffbd19a74737946107a9 (patch)
tree257f78d683d3f9f80dc05ec34ea6dc2443aa1851
parent90eecfaa1739189ae10d3735af28ba8a80f98f4c (diff)
downloadbuildstream-d946255d0b94d8e52c56ffbd19a74737946107a9.tar.gz
_artifactcache.py: Handle BlobNotFound error in pull()
-rw-r--r--src/buildstream/_artifactcache.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buildstream/_artifactcache.py b/src/buildstream/_artifactcache.py
index 4290e92cb..9b800acaa 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)