From f6c57effb747917d02fe1781c95a28eb37c184be Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Wed, 14 Jun 2017 15:24:52 +1000 Subject: [PATCH] Read layout from BuildSet in first merge scenario When you are running the first test of a project then the layout doesn't contain the project and so can't report. It seems like this used to be able to be pulled from the QueueItem.layout but this doesn't seem to be set any more. If we get it from the BuildSet this works so we should allow it to be sourced from there. Change-Id: Icf972d1c5eb351e7800c05064f94b86513df660b Signed-off-by: Jamie Lennox --- zuul/manager/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zuul/manager/__init__.py b/zuul/manager/__init__.py index c3958d7c2f..e59ad84b6b 100644 --- a/zuul/manager/__init__.py +++ b/zuul/manager/__init__.py @@ -738,7 +738,9 @@ class PipelineManager(object): # pipeline, use the dynamic layout if available, otherwise, # fall back to the current static layout as a best # approximation. - layout = item.layout or self.pipeline.layout + layout = (item.layout or + item.current_build_set.layout or + self.pipeline.layout) if not layout.hasProject(item.change.project): self.log.debug("Project %s not in pipeline %s for change %s" % (