[Notes] [Git][BuildStream/buildstream][abderrahim/artifact-cache-junction] _project.py: use artifact caches from the parent project first



Title: GitLab

Abderrahim Kitouni pushed to branch abderrahim/artifact-cache-junction at BuildStream / buildstream

Commits:

2 changed files:

Changes:

  • buildstream/_artifactcache.py
    ... ... @@ -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]