Title: [243914] trunk/Tools
Revision
243914
Author
aakash_j...@apple.com
Date
2019-04-04 15:44:38 -0700 (Thu, 04 Apr 2019)

Log Message

[ews-app] while waiting in queue status-bubble for testers queues should display build information from builder queue
https://bugs.webkit.org/show_bug.cgi?id=196618

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble): Added QUEUE_TRIGGERS.
(StatusBubble._build_bubble): Get the build from builder if tester has not started the build yet.
(StatusBubble._get_parent_queue): Get the name of the parent (builder) queue.
(StatusBubble.get_latest_build_for_queue): If the queue doesn't have any build yet, return build information from
its parent(builder).

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py (243913 => 243914)


--- trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2019-04-04 22:42:43 UTC (rev 243913)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2019-04-04 22:44:38 UTC (rev 243914)
@@ -40,6 +40,11 @@
     ALL_QUEUES = ['api-ios', 'api-mac', 'bindings', 'gtk', 'ios', 'ios-sim', 'ios-wk2', 'jsc', 'mac', 'mac-32bit', 'mac-32bit-wk2',
                     'mac-debug', 'mac-debug-wk1', 'mac-wk1', 'mac-wk2', 'style', 'webkitperl', 'webkitpy', 'win', 'wincairo', 'wpe']
     ENABLED_QUEUES = ['api-ios', 'api-mac', 'webkitperl']
+    # FIXME: Auto-generate the queue's trigger relationship
+    QUEUE_TRIGGERS = {
+        'api-ios': 'ios-sim',
+        'api-mac': 'mac',
+    }
 
     STEPS_TO_HIDE = ['Killed old processes', 'Configured build', '^OS:.*Xcode:', '(skipped)']
 
@@ -47,7 +52,7 @@
         bubble = {
             'name': queue,
         }
-        build = self.get_latest_build_for_queue(patch, queue)
+        build, is_parent_build = self.get_latest_build_for_queue(patch, queue, self._get_parent_queue(queue))
         if not self._should_show_bubble_for_build(build):
             return None
 
@@ -63,8 +68,12 @@
             bubble['state'] = 'started'
             bubble['details_message'] = 'Build is in-progress. Recent messages:\n\n' + self._steps_messages(build)
         elif build.result == Buildbot.SUCCESS:
-            bubble['state'] = 'pass'
-            bubble['details_message'] = 'Pass'
+            if is_parent_build:
+                bubble['state'] = 'started'
+                bubble['details_message'] = 'Build is in-progress. Recent messages:\n\n' + self._steps_messages(build) + '\n\nWaiting to run tests.'
+            else:
+                bubble['state'] = 'pass'
+                bubble['details_message'] = 'Pass'
         elif build.result == Buildbot.WARNINGS:
             bubble['state'] = 'pass'
             bubble['details_message'] = 'Warning\n\n' + self._steps_messages(build)
@@ -107,6 +116,9 @@
 
         return bubble
 
+    def _get_parent_queue(self, queue):
+        return StatusBubble.QUEUE_TRIGGERS.get(queue)
+
     def get_os_details(self, build):
         for step in build.step_set.all():
             if step.state_string.startswith('OS:'):
@@ -133,12 +145,16 @@
             return ''
         return recent_step.state_string
 
-    def get_latest_build_for_queue(self, patch, queue):
+    def get_latest_build_for_queue(self, patch, queue, parent_queue=None):
         builds = self.get_builds_for_queue(patch, queue)
+        is_parent_build = False
+        if not builds and parent_queue:
+            builds = self.get_builds_for_queue(patch, parent_queue)
+            is_parent_build = True
         if not builds:
-            return None
+            return (None, None)
         builds.sort(key=lambda build: build.started_at, reverse=True)
-        return builds[0]
+        return (builds[0], is_parent_build)
 
     def get_builds_for_queue(self, patch, queue):
         return [build for build in patch.build_set.all() if build.builder_display_name == queue]

Modified: trunk/Tools/ChangeLog (243913 => 243914)


--- trunk/Tools/ChangeLog	2019-04-04 22:42:43 UTC (rev 243913)
+++ trunk/Tools/ChangeLog	2019-04-04 22:44:38 UTC (rev 243914)
@@ -1,5 +1,19 @@
 2019-04-04  Aakash Jain  <aakash_j...@apple.com>
 
+        [ews-app] while waiting in queue status-bubble for testers queues should display build information from builder queue
+        https://bugs.webkit.org/show_bug.cgi?id=196618
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
+        (StatusBubble): Added QUEUE_TRIGGERS.
+        (StatusBubble._build_bubble): Get the build from builder if tester has not started the build yet.
+        (StatusBubble._get_parent_queue): Get the name of the parent (builder) queue.
+        (StatusBubble.get_latest_build_for_queue): If the queue doesn't have any build yet, return build information from
+        its parent(builder).
+
+2019-04-04  Aakash Jain  <aakash_j...@apple.com>
+
         [ews-app] Status-bubble steps are sometimes displayed in reverse order
         https://bugs.webkit.org/show_bug.cgi?id=196625
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to