This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch tristan/handle-asset-cache-error in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 4981082d00314d3b557f6d0f06a6b3ce62e4f054 Author: Tristan van Berkom <[email protected]> AuthorDate: Wed May 11 07:49:39 2022 +0900 _elementsourcescache.py: Properly handle AssetCacheError --- src/buildstream/_elementsourcescache.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/buildstream/_elementsourcescache.py b/src/buildstream/_elementsourcescache.py index e5587b1db..fcbd98794 100644 --- a/src/buildstream/_elementsourcescache.py +++ b/src/buildstream/_elementsourcescache.py @@ -260,11 +260,8 @@ class ElementSourcesCache(AssetCache): # Skip push if source is already on the server if response and response.blob_digest == source_digest: return False - except grpc.RpcError as e: - if e.code() != grpc.StatusCode.NOT_FOUND: - raise SourceCacheError( - "Error checking source cache with status {}: {}".format(e.code().name, e.details()), temporary=True - ) + except AssetCacheError as e: + raise SourceCacheError("Error checking source cache: {}".format(e), temporary=True) from e referenced_directories = [source_proto.files]
