[ews] Prioritize builders over testers when a bot is shared over multiple queues
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Nov 2019 18:53:48 +0000 (18:53 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Nov 2019 18:53:48 +0000 (18:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=204007

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/loadConfig.py:
(loadBuilderConfig):
(prioritizeBuilders): Method to prioritize builder queues over tester queues.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252244 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/ews-build/loadConfig.py
Tools/ChangeLog

index 721423a..d9a52dc 100644 (file)
@@ -77,6 +77,7 @@ def loadBuilderConfig(c, is_test_mode_enabled=False, master_prefix_path='./'):
 
         c['builders'].append(builder)
 
+    c['prioritizeBuilders'] = prioritizeBuilders
     c['schedulers'] = []
     for scheduler in config['schedulers']:
         schedulerClassName = scheduler.pop('type')
@@ -91,6 +92,12 @@ def loadBuilderConfig(c, is_test_mode_enabled=False, master_prefix_path='./'):
         c['schedulers'].append(schedulerClass(**scheduler))
 
 
+def prioritizeBuilders(buildmaster, builders):
+    # Prioritize builder queues over tester queues
+    builders.sort(key=lambda b: 'build' in b.name.lower(), reverse=True)
+    return builders
+
+
 def checkValidWorker(worker):
     if not worker:
         raise Exception('Worker is None or Empty.')
index 8e8c7f8..75ab319 100644 (file)
@@ -1,3 +1,14 @@
+2019-11-08  Aakash Jain  <aakash_jain@apple.com>
+
+        [ews] Prioritize builders over testers when a bot is shared over multiple queues
+        https://bugs.webkit.org/show_bug.cgi?id=204007
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/loadConfig.py:
+        (loadBuilderConfig):
+        (prioritizeBuilders): Method to prioritize builder queues over tester queues.
+
 2019-11-08  Alex Christensen  <achristensen@webkit.org>
 
         Build fix for platforms without WebRTC's SSL after r252185