[Notes] [Git][BuildStream/buildstream][Qinusty/502] cascache.py: Raise ArtifactError on grpc error



Title: GitLab

Qinusty pushed to branch Qinusty/502 at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/_artifactcache/cascache.py
    ... ... @@ -240,7 +240,7 @@ 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(element._get_brief_display_key(), e))
    
    244 244
     
    
    245 245
             return False
    
    246 246
     
    
    ... ... @@ -285,6 +285,7 @@ class CASCache(ArtifactCache):
    285 285
     
    
    286 286
                         except grpc.RpcError as e:
    
    287 287
                             if e.code() != grpc.StatusCode.NOT_FOUND:
    
    288
    +                            # Intentionally re-raise RpcError for outer except block.
    
    288 289
                                 raise
    
    289 290
     
    
    290 291
                         missing_blobs = {}
    



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