diff options
author | Josh Smith <joshsmith@codethink.co.uk> | 2018-07-25 12:39:12 +0100 |
---|---|---|
committer | Josh Smith <joshsmith@codethink.co.uk> | 2018-07-26 15:24:32 +0100 |
commit | c8ce05e2d2622c8e501abb96b8cdccd6ea1dce81 (patch) | |
tree | 3c9457b88042c61ca0518961fdb08a5f3097aeee | |
parent | 4bd263290568e2c9a6e42248b8560ddd73e53011 (diff) | |
download | buildstream-c8ce05e2d2622c8e501abb96b8cdccd6ea1dce81.tar.gz |
cascache.py: Update cache push/pull errors to be temporary
Further work needs to be done for the current grpc exceptions which are reraised.
-rw-r--r-- | buildstream/_artifactcache/cascache.py | 2 | ||||
-rw-r--r-- | buildstream/_exceptions.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/buildstream/_artifactcache/cascache.py b/buildstream/_artifactcache/cascache.py index c1c75a26f..6f5898426 100644 --- a/buildstream/_artifactcache/cascache.py +++ b/buildstream/_artifactcache/cascache.py @@ -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 diff --git a/buildstream/_exceptions.py b/buildstream/_exceptions.py index ada697a53..2b1d379c4 100644 --- a/buildstream/_exceptions.py +++ b/buildstream/_exceptions.py @@ -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 |