[Notes] [Git][BuildStream/buildstream][tristan/fix-cache-exclusivity-1.2] 3 commits: _scheduler/queues: Mark build and pull queue as requiring shared access to the CACHE



Title: GitLab

Tristan Van Berkom pushed to branch tristan/fix-cache-exclusivity-1.2 at BuildStream / buildstream

Commits:

4 changed files:

Changes:

  • buildstream/_scheduler/queues/buildqueue.py
    ... ... @@ -28,7 +28,7 @@ class BuildQueue(Queue):
    28 28
     
    
    29 29
         action_name = "Build"
    
    30 30
         complete_name = "Built"
    
    31
    -    resources = [ResourceType.PROCESS]
    
    31
    +    resources = [ResourceType.PROCESS, ResourceType.CACHE]
    
    32 32
     
    
    33 33
         def process(self, element):
    
    34 34
             element._assemble()
    

  • buildstream/_scheduler/queues/pullqueue.py
    ... ... @@ -29,7 +29,7 @@ class PullQueue(Queue):
    29 29
     
    
    30 30
         action_name = "Pull"
    
    31 31
         complete_name = "Pulled"
    
    32
    -    resources = [ResourceType.DOWNLOAD]
    
    32
    +    resources = [ResourceType.DOWNLOAD, ResourceType.CACHE]
    
    33 33
     
    
    34 34
         def process(self, element):
    
    35 35
             # returns whether an artifact was downloaded or not
    

  • buildstream/_scheduler/resources.py
    ... ... @@ -8,7 +8,7 @@ class ResourceType():
    8 8
     class Resources():
    
    9 9
         def __init__(self, num_builders, num_fetchers, num_pushers):
    
    10 10
             self._max_resources = {
    
    11
    -            ResourceType.CACHE: 1,
    
    11
    +            ResourceType.CACHE: 0,
    
    12 12
                 ResourceType.DOWNLOAD: num_fetchers,
    
    13 13
                 ResourceType.PROCESS: num_builders,
    
    14 14
                 ResourceType.UPLOAD: num_pushers
    

  • buildstream/_scheduler/scheduler.py
    ... ... @@ -330,7 +330,6 @@ class Scheduler():
    330 330
             job = CacheSizeJob(self, 'cache_size', 'cache_size/cache_size',
    
    331 331
                                resources=[ResourceType.CACHE,
    
    332 332
                                           ResourceType.PROCESS],
    
    333
    -                           exclusive_resources=[ResourceType.CACHE],
    
    334 333
                                complete_cb=self._run_cleanup)
    
    335 334
             self.schedule_jobs([job])
    
    336 335
     
    



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