Browse Source

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
tags/3.4.0
James E. Blair 5 months ago
parent
commit
101ec7c486
No account linked to committer's email address
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      zuul/manager/__init__.py

+ 3
- 1
zuul/manager/__init__.py View File

@@ -87,7 +87,9 @@ class PipelineManager(object):
87 87
 
88 88
     def getNodePriority(self, item):
89 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 93
         for idx, val in enumerate(items):
92 94
             if item == val:
93 95
                 return idx

Loading…
Cancel
Save