Skip to content
Snippets Groups Projects
Commit 9be2c1b3 authored by Qinusty's avatar Qinusty Committed by Francisco Redondo Marchena
Browse files

cascache.py: Update cache push/pull errors to be temporary

Further work needs to be done for the current grpc exceptions which are reraised.
parent f0d53c7d
No related branches found
No related tags found
No related merge requests found
......@@ -340,7 +340,7 @@ class CASCache(ArtifactCache):
except grpc.RpcError as e:
if e.code() != grpc.StatusCode.RESOURCE_EXHAUSTED:
raise ArtifactError("Failed to push artifact {}: {}".format(refs, e)) from e
raise ArtifactError("Failed to push artifact {}: {}".format(refs, e), temporary=True) from e
return pushed
......
......@@ -254,8 +254,8 @@ class SandboxError(BstError):
# Raised when errors are encountered in the artifact caches
#
class ArtifactError(BstError):
def __init__(self, message, *, detail=None, reason=None):
super().__init__(message, detail=detail, domain=ErrorDomain.ARTIFACT, reason=reason)
def __init__(self, message, *, detail=None, reason=None, temporary=False):
super().__init__(message, detail=detail, domain=ErrorDomain.ARTIFACT, reason=reason, temporary=True)
# PipelineError
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment