Avoid multiple build cancelations

The cancelJobs method can be called multiple times for an item
(but with prime=False).  It was possible for zuul to emit multiple
stop jobs in that case.  To avoid that, only cancel builds which
have not yet reported a result.

Change-Id: I1aec01396fcd317cfe8446c582abdc1e3a933410
changes/77/428477/4
James E. Blair 6 years ago
parent 0ef64f85c4
commit 98095cf4f8

@ -398,6 +398,9 @@ class PipelineManager(object):
old_build_set.node_requests = {}
canceled_jobs = set()
for build in old_build_set.getBuilds():
if build.result:
canceled_jobs.add(build.job.name)
continue
was_running = False
try:
was_running = self.sched.launcher.cancel(build)

Loading…
Cancel
Save