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



Title: GitLab

Qinusty pushed to branch Qinusty/pytest_cache_gitignore at BuildStream / buildstream

Commits:

2 changed files:

Changes:

  • .gitignore
    ... ... @@ -15,6 +15,7 @@ tmp
    15 15
     .coverage
    
    16 16
     .coverage.*
    
    17 17
     .cache
    
    18
    +.pytest_cache/
    
    18 19
     *.bst/
    
    19 20
     
    
    20 21
     # Pycache, in case buildstream is ran directly from within the source
    

  • 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]