summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2018-11-30 15:08:39 -0800
committerTobias Henkel <tobias.henkel@bmw.de>2018-12-01 15:28:33 +0100
commit101ec7c4863804234153dff55efc36313d3e328b (patch)
tree98f26f128eb90103a5b170be80efe0cb131a68e2
parent505c32e4b23ef81f7b4a13f91c6d062d3f1fa4fc (diff)
Only count live items for relative priority
Non-live items in a pipeline don't have node requests, so don't penalize long patch series by counting the non-live ancestors of changes when calculating relative_priority. Change-Id: I7ec63e2ea4403087dd43c3b15eb703a2fa5542a7
Notes
Notes (review): Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de> Code-Review+2: Monty Taylor <mordred@inaugust.com> Workflow+1: Monty Taylor <mordred@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sat, 01 Dec 2018 15:43:27 +0000 Reviewed-on: https://review.openstack.org/621315 Project: openstack-infra/zuul Branch: refs/heads/master
-rw-r--r--zuul/manager/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/zuul/manager/__init__.py b/zuul/manager/__init__.py
index 90d02d1..775c590 100644
--- a/zuul/manager/__init__.py
+++ b/zuul/manager/__init__.py
@@ -87,7 +87,9 @@ class PipelineManager(object):
87 87
88 def getNodePriority(self, item): 88 def getNodePriority(self, item):
89 items = self.pipeline.getAllItems() 89 items = self.pipeline.getAllItems()
90 items = [i for i in items if i.change.project == item.change.project] 90 items = [i for i in items
91 if i.change.project == item.change.project and
92 i.live]
91 for idx, val in enumerate(items): 93 for idx, val in enumerate(items):
92 if item == val: 94 if item == val:
93 return idx 95 return idx