[Notes] [Git][BuildStream/buildstream][gokcennurlu/remote_url_override_push_error] fixup! Refactor setup_remotes() to remove --remote overriding logic



Title: GitLab

Gökçen Nurlu pushed to branch gokcennurlu/remote_url_override_push_error at BuildStream / buildstream

Commits:

2 changed files:

Changes:

  • buildstream/_artifactcache/artifactcache.py
    ... ... @@ -123,8 +123,8 @@ class ArtifactCache():
    123 123
         #
    
    124 124
         def get_remotes_from_projects(self):
    
    125 125
             return [
    
    126
    -            (_configured_remote_artifact_cache_specs(self.context, prj), prj)
    
    127
    -            for prj in self.context.get_projects()
    
    126
    +            (_configured_remote_artifact_cache_specs(self.context, proj), proj)
    
    127
    +            for proj in self.context.get_projects()
    
    128 128
             ]
    
    129 129
     
    
    130 130
         # setup_remotes():
    

  • buildstream/_stream.py
    ... ... @@ -935,13 +935,14 @@ class Stream():
    935 935
                 self._pipeline.resolve_elements(track_selected)
    
    936 936
                 return [], track_selected
    
    937 937
     
    
    938
    +        remotes = []
    
    938 939
             if use_artifact_config:
    
    939 940
                 # ArtifactCache.get_remotes_from_projects expects all projects to be
    
    940 941
                 # fully loaded
    
    941 942
                 for project in self._context.get_projects():
    
    942 943
                     project.ensure_fully_loaded()
    
    943 944
                 remotes = self._artifacts.get_remotes_from_projects()
    
    944
    -        else:
    
    945
    +        elif artifact_remote_url is not None:
    
    945 946
                 # Build the ArtifactCacheSpec instance based on `--remote`
    
    946 947
                 remotes = [(
    
    947 948
                     [ArtifactCacheSpec(artifact_remote_url, push=artifact_remote_can_push)],
    



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