summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@hp.com>2015-02-05 10:45:54 -0800
committerJames E. Blair <jeblair@hp.com>2015-02-07 10:25:43 -0800
commitec2e156495d9746446ec458550afd50856cefcf1 (patch)
tree736e4f5bd9d781852fdfda04d27c8b8d8d1d82ec
parent1671ea5ffd8d0ed8ea0b040d913a358143ae662d (diff)
downloadzuul-ec2e156495d9746446ec458550afd50856cefcf1.tar.gz
Add extra liveness check to queue processor
Currently, areAllJobsComplete(item) is always False for a non-live item because jobs are never started. However, to make the logic of the queue processor more explicit, and protect against a future potential improvement where a non-live item has no jobs associated, check for whether an item is live along with the rest of the criteria for the step where an item is dequeued when complete. Change-Id: I1685de0705bc0cffddc528e80bf4beeb20ad3803
-rw-r--r--zuul/scheduler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/zuul/scheduler.py b/zuul/scheduler.py
index ffb8e3f83..42a42a301 100644
--- a/zuul/scheduler.py
+++ b/zuul/scheduler.py
@@ -1354,7 +1354,8 @@ class BasePipelineManager(object):
failing_reasons.append("is a non-live item with no items behind")
self.dequeueItem(item)
changed = True
- if (not item_ahead) and self.pipeline.areAllJobsComplete(item):
+ if ((not item_ahead) and self.pipeline.areAllJobsComplete(item)
+ and item.live):
try:
self.reportItem(item)
except MergeFailure: