diff options
author | Josh Smith <joshsmith@codethink.co.uk> | 2018-07-25 12:39:12 +0100 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-07-27 13:41:26 +0900 |
commit | 9b2bc78fca5701c058d397abac16e284a31c76a4 (patch) | |
tree | 862c57e155577cf8e3c1116dce5f54703b44eb4a | |
parent | 0a7cfcdfdd71885a404e780027893e3ab9be4b84 (diff) | |
download | buildstream-9b2bc78fca5701c058d397abac16e284a31c76a4.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 |