Include job_uuid in NodeRequests

This is part of the circular dependency refactor.  It updates the
NodeRequest object to include the job_uuid in addition to the job_name
(which is temporarily kept for backwards compatability).  When node
requests are completed, we now look up the job by uuid if supplied.

Change-Id: I57d4ab6c241b03f76f80346b5567600e1692947a
This commit is contained in:
James E. Blair
2023-12-20 09:52:40 -08:00
parent 9201f9ee28
commit 7262ef7f6f
8 changed files with 86 additions and 17 deletions

View File

@@ -3047,12 +3047,11 @@ class Scheduler(threading.Thread):
return
log = get_annotated_logger(self.log, request.event_id)
job = build_set.item.getJob(request.job_name)
job = build_set.item.getJob(request._job_id)
if job is None:
log.warning("Item %s does not contain job %s "
"for node request %s",
build_set.item, request.job_name, request)
build_set.removeJobNodeRequestID(request.job_name)
build_set.item, request._job_id, request)
return
# If the request failed, we must directly delete it as the nodes will
@@ -3063,7 +3062,7 @@ class Scheduler(threading.Thread):
nodeset = self.nodepool.getNodeSet(request, job.nodeset)
job = build_set.item.getJob(request.job_name)
job = build_set.item.getJob(request._job_id)
if build_set.getJobNodeSetInfo(job) is None:
pipeline.manager.onNodesProvisioned(request, nodeset, build_set)
else: