Merge "Improve error reporting for zuul dequeue"

This commit is contained in:
Zuul 2019-07-31 02:43:37 +00:00 committed by Gerrit Code Review
commit 1403729721
1 changed files with 7 additions and 1 deletions

View File

@ -959,8 +959,14 @@ class Scheduler(threading.Thread):
def _doDequeueEvent(self, event):
tenant = self.abide.tenants.get(event.tenant_name)
pipeline = tenant.layout.pipelines[event.pipeline_name]
if tenant is None:
raise ValueError('Unknown tenant %s' % event.tenant_name)
pipeline = tenant.layout.pipelines.get(event.pipeline_name)
if pipeline is None:
raise ValueError('Unknown pipeline %s' % event.pipeline_name)
(trusted, project) = tenant.getProject(event.project_name)
if project is None:
raise ValueError('Unknown project %s' % event.project_name)
change = project.source.getChange(event, project)
if change.project.name != project.name:
if event.change: