From 336e48d82432f99847d59a26d055c1255ea9b0e1 Mon Sep 17 00:00:00 2001 From: Simon Westphahl Date: Tue, 11 May 2021 14:19:51 +0200 Subject: [PATCH] Remove use of item's layout in Nodepool API The useNodeSet() method was still using an item's layout to get the tenant name. Since the layout might be set to None during a re-enqueue (see Id7cef4f1fa222b1491418ea2449687964fcfb361) we need to get the tenant name via the pipeline instead. Change-Id: I3835b5082681930b962cecf7fe6edcf2a211465a --- zuul/nodepool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zuul/nodepool.py b/zuul/nodepool.py index 69ce515f4e..b21ed0f64b 100644 --- a/zuul/nodepool.py +++ b/zuul/nodepool.py @@ -238,7 +238,7 @@ class Nodepool(object): if build_set and resources: # we have a buildset and thus also tenant and project so we # can emit project specific resource usage stats - tenant_name = build_set.item.layout.tenant.name + tenant_name = build_set.item.pipeline.tenant.name project_name = build_set.item.change.project.canonical_name self.current_resources_by_tenant.setdefault(