diff options
author | James E. Blair <jim@acmegating.com> | 2022-09-02 10:01:44 -0700 |
---|---|---|
committer | James E. Blair <jim@acmegating.com> | 2022-09-08 13:32:11 -0700 |
commit | 06509d5e8a4d51fed363caa499a923011130d1e3 (patch) | |
tree | 54f3ca34876ec014d4c777fa39c620e9806fbe35 /zuul/manager | |
parent | 024246cb72b05caca3a797612490f83c1434d339 (diff) | |
download | zuul-06509d5e8a4d51fed363caa499a923011130d1e3.tar.gz |
Remove deprecated pipeline queue configuration
This was deprecated quite some time ago and we should remove it as
part of the next major release.
Also remove a very old Zuul v1 layout.yaml from the test fixtures.
Change-Id: I40030840b71e95f813f028ff31bc3e9b3eac4d6a
Diffstat (limited to 'zuul/manager')
-rw-r--r-- | zuul/manager/__init__.py | 30 | ||||
-rw-r--r-- | zuul/manager/shared.py | 14 |
2 files changed, 9 insertions, 35 deletions
diff --git a/zuul/manager/__init__.py b/zuul/manager/__init__.py index 637d31d9f..dcaea5283 100644 --- a/zuul/manager/__init__.py +++ b/zuul/manager/__init__.py @@ -133,26 +133,19 @@ class PipelineManager(metaclass=ABCMeta): for project_name, project_configs in layout_project_configs.items(): (trusted, project) = tenant.getProject(project_name) - project_queue_name = None - pipeline_queue_name = None + queue_name = None project_in_pipeline = False for project_config in layout.getAllProjectConfigs(project_name): project_pipeline_config = project_config.pipelines.get( self.pipeline.name) - if not project_queue_name: - project_queue_name = project_config.queue_name + if not queue_name: + queue_name = project_config.queue_name if project_pipeline_config is None: continue project_in_pipeline = True - if not pipeline_queue_name: - pipeline_queue_name = project_pipeline_config.queue_name if not project_in_pipeline: continue - # Note: we currently support queue name per pipeline and per - # project while project has precedence. - queue_name = project_queue_name or pipeline_queue_name - if not queue_name: continue if queue_name in change_queues: @@ -658,13 +651,12 @@ class PipelineManager(metaclass=ABCMeta): def getQueueConfig(self, project): layout = self.pipeline.tenant.layout - pipeline_queue_name = None - project_queue_name = None + queue_name = None for project_config in layout.getAllProjectConfigs( project.canonical_name ): - if not project_queue_name: - project_queue_name = project_config.queue_name + if not queue_name: + queue_name = project_config.queue_name project_pipeline_config = project_config.pipelines.get( self.pipeline.name) @@ -672,16 +664,6 @@ class PipelineManager(metaclass=ABCMeta): if project_pipeline_config is None: continue - # TODO(simonw): Remove pipeline_queue_name after deprecation - if not pipeline_queue_name: - pipeline_queue_name = project_pipeline_config.queue_name - - # Note: we currently support queue name per pipeline and per - # project while project has precedence. - queue_name = project_queue_name or pipeline_queue_name - if queue_name is None: - return None - return layout.queues.get(queue_name) def canProcessCycle(self, project): diff --git a/zuul/manager/shared.py b/zuul/manager/shared.py index db8735289..4be107db9 100644 --- a/zuul/manager/shared.py +++ b/zuul/manager/shared.py @@ -71,27 +71,19 @@ class SharedQueuePipelineManager(PipelineManager, metaclass=ABCMeta): for project_name, project_configs in layout_project_configs.items(): (trusted, project) = tenant.getProject(project_name) - project_queue_name = None - pipeline_queue_name = None + queue_name = None project_in_pipeline = False for project_config in layout.getAllProjectConfigs(project_name): project_pipeline_config = project_config.pipelines.get( self.pipeline.name) - if not project_queue_name: - project_queue_name = project_config.queue_name + if not queue_name: + queue_name = project_config.queue_name if project_pipeline_config is None: continue project_in_pipeline = True - # TODO(tobiash): Remove pipeline_queue_name after deprecation - if not pipeline_queue_name: - pipeline_queue_name = project_pipeline_config.queue_name if not project_in_pipeline: continue - # Note: we currently support queue name per pipeline and per - # project while project has precedence. - queue_name = project_queue_name or pipeline_queue_name - # Check if the queue is global or per branch queue = layout.queues.get(queue_name) per_branch = queue and queue.per_branch |