[ews-app] while waiting in queue status-bubble for testers queues should display...
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Apr 2019 22:44:38 +0000 (22:44 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Apr 2019 22:44:38 +0000 (22:44 +0000)
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).

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

Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py
Tools/ChangeLog

index 1f19cd3..3c48f12 100644 (file)
@@ -40,6 +40,11 @@ class StatusBubble(View):
     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 @@ class StatusBubble(View):
         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 @@ class StatusBubble(View):
             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 @@ class StatusBubble(View):
 
         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 @@ class StatusBubble(View):
             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]
index c9a18fa..5e4fedb 100644 (file)
@@ -1,5 +1,19 @@
 2019-04-04  Aakash Jain  <aakash_jain@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_jain@apple.com>
+
         [ews-app] Status-bubble steps are sometimes displayed in reverse order
         https://bugs.webkit.org/show_bug.cgi?id=196625