[Notes] [Git][BuildStream/buildstream][master] 2 commits: cascache.py: Raise ArtifactError on grpc error



Title: GitLab

Tristan Maat pushed to branch master at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/_artifactcache/cascache.py
    ... ... @@ -240,7 +240,8 @@ class CASCache(ArtifactCache):
    240 240
     
    
    241 241
                 except grpc.RpcError as e:
    
    242 242
                     if e.code() != grpc.StatusCode.NOT_FOUND:
    
    243
    -                    raise
    
    243
    +                    raise ArtifactError("Failed to pull artifact {}: {}".format(
    
    244
    +                        element._get_brief_display_key(), e)) from e
    
    244 245
     
    
    245 246
             return False
    
    246 247
     
    
    ... ... @@ -285,6 +286,7 @@ class CASCache(ArtifactCache):
    285 286
     
    
    286 287
                         except grpc.RpcError as e:
    
    287 288
                             if e.code() != grpc.StatusCode.NOT_FOUND:
    
    289
    +                            # Intentionally re-raise RpcError for outer except block.
    
    288 290
                                 raise
    
    289 291
     
    
    290 292
                         missing_blobs = {}
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]