summaryrefslogtreecommitdiff
path: root/zuul/nodepool.py
diff options
context:
space:
mode:
authorSimon Westphahl <simon.westphahl@bmw.de>2022-10-07 14:20:10 +0200
committerSimon Westphahl <simon.westphahl@bmw.de>2022-10-07 15:29:49 +0200
commitd864d83ade70aed91a15560fbca0f075eaaefeee (patch)
tree7941a561333f5cab0ffa054e84d7d72fbcfbe5c7 /zuul/nodepool.py
parent30c725ff6eeecdf7769ac28fee0e71da147fb47c (diff)
downloadzuul-d864d83ade70aed91a15560fbca0f075eaaefeee.tar.gz
End node request span when result event is sent
The node request span needs to be ended whenever we add a result event to the pipeline. Before we only did that when iterating over the node requests after we've won the nodepool election. Change-Id: I0276d5498b243522540657352a733d663ae71918
Diffstat (limited to 'zuul/nodepool.py')
-rw-r--r--zuul/nodepool.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/zuul/nodepool.py b/zuul/nodepool.py
index 1118fe0c2..6a6afce58 100644
--- a/zuul/nodepool.py
+++ b/zuul/nodepool.py
@@ -84,6 +84,10 @@ class Nodepool(object):
del self.election
def _sendNodesProvisionedEvent(self, request):
+ tracing.endSavedSpan(request.span_info, attributes={
+ "request_id": request.id,
+ "state": request.state,
+ })
tenant_name = request.tenant_name
pipeline_name = request.pipeline_name
event = model.NodesProvisionedEvent(request.id, request.build_set_uuid)
@@ -101,10 +105,6 @@ class Nodepool(object):
continue
if (request.state in {model.STATE_FULFILLED,
model.STATE_FAILED}):
- tracing.endSavedSpan(request.span_info, attributes={
- "request_id": request.id,
- "state": request.state,
- })
self._sendNodesProvisionedEvent(request)
# Now resume normal event processing.
self.stop_watcher_event.wait()