[Notes] [Git][BuildStream/buildstream][jjardon/fedora_27] 4 commits: _artifactcache.py: don't leak the project specific remote caches



Title: GitLab

Jürg Billeter pushed to branch jjardon/fedora_27 at BuildStream / buildstream

Commits:

3 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -49,10 +49,6 @@ tests-debian-9:
    49 49
       image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-debian:9-master-46405991
    
    50 50
       <<: *tests
    
    51 51
     
    
    52
    -tests-fedora-27:
    
    53
    -  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:27-master-46405991
    
    54
    -  <<: *tests
    
    55
    -
    
    56 52
     tests-fedora-28:
    
    57 53
       image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991
    
    58 54
       <<: *tests
    
    ... ... @@ -95,7 +91,7 @@ overnight-fedora-28-aarch64:
    95 91
     tests-unix:
    
    96 92
       # Use fedora here, to a) run a test on fedora and b) ensure that we
    
    97 93
       # can get rid of ostree - this is not possible with debian-8
    
    98
    -  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:27-master-46405991
    
    94
    +  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:28-master-46405991
    
    99 95
       <<: *tests
    
    100 96
       variables:
    
    101 97
         BST_FORCE_BACKEND: "unix"
    
    ... ... @@ -291,7 +287,6 @@ coverage:
    291 287
         - cp -a .coverage-reports/ ./coverage-report
    
    292 288
       dependencies:
    
    293 289
       - tests-debian-9
    
    294
    -  - tests-fedora-27
    
    295 290
       - tests-fedora-28
    
    296 291
       - tests-fedora-missing-deps
    
    297 292
       - tests-ubuntu-18.04
    

  • buildstream/_artifactcache.py
    ... ... @@ -467,7 +467,7 @@ class ArtifactCache():
    467 467
         #     on_failure (callable): Called if we fail to contact one of the caches.
    
    468 468
         #
    
    469 469
         def initialize_remotes(self, *, on_failure=None):
    
    470
    -        remote_specs = self.global_remote_specs
    
    470
    +        remote_specs = list(self.global_remote_specs)
    
    471 471
     
    
    472 472
             for project in self.project_remote_specs:
    
    473 473
                 remote_specs += self.project_remote_specs[project]
    
    ... ... @@ -1046,8 +1046,5 @@ class ArtifactCache():
    1046 1046
     #   A list of ArtifactCacheSpec instances describing the remote artifact caches.
    
    1047 1047
     #
    
    1048 1048
     def _configured_remote_artifact_cache_specs(context, project):
    
    1049
    -    project_overrides = context.get_overrides(project.name)
    
    1050
    -    project_extra_specs = ArtifactCache.specs_from_config_node(project_overrides)
    
    1051
    -
    
    1052 1049
         return list(utils._deduplicate(
    
    1053
    -        project_extra_specs + project.artifact_cache_specs + context.artifact_cache_specs))
    1050
    +        project.artifact_cache_specs + context.artifact_cache_specs))

  • buildstream/_project.py
    ... ... @@ -549,7 +549,15 @@ class Project():
    549 549
             #
    
    550 550
     
    
    551 551
             # Load artifacts pull/push configuration for this project
    
    552
    -        self.artifact_cache_specs = ArtifactCache.specs_from_config_node(config, self.directory)
    
    552
    +        project_specs = ArtifactCache.specs_from_config_node(config, self.directory)
    
    553
    +        override_specs = ArtifactCache.specs_from_config_node(
    
    554
    +            self._context.get_overrides(self.name), self.directory)
    
    555
    +
    
    556
    +        self.artifact_cache_specs = override_specs + project_specs
    
    557
    +
    
    558
    +        if self.junction:
    
    559
    +            parent = self.junction._get_project()
    
    560
    +            self.artifact_cache_specs = parent.artifact_cache_specs + self.artifact_cache_specs
    
    553 561
     
    
    554 562
             # Load remote-execution configuration for this project
    
    555 563
             project_specs = SandboxRemote.specs_from_config_node(config, self.directory)
    



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