Title: [258997] trunk/Tools
Revision
258997
Author
aakash_j...@apple.com
Date
2020-03-25 11:08:01 -0700 (Wed, 25 Mar 2020)

Log Message

[ews] status-bubble should link to buildbot queue while waiting in queue
https://bugs.webkit.org/show_bug.cgi?id=209543

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble._build_bubble): Link to buildbot queue whil patch is waiting in queue.
* BuildSlaveSupport/ews-app/ews/common/buildbot.py:
(Buildbot.update_icons_for_queues_mapping): Generate the mapping for shortname to full queue name.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/ews-app/ews/common/buildbot.py (258996 => 258997)


--- trunk/Tools/BuildSlaveSupport/ews-app/ews/common/buildbot.py	2020-03-25 17:37:04 UTC (rev 258996)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/common/buildbot.py	2020-03-25 18:08:01 UTC (rev 258997)
@@ -39,6 +39,7 @@
     ALL_RESULTS = lrange(7)
     SUCCESS, WARNINGS, FAILURE, SKIPPED, EXCEPTION, RETRY, CANCELLED = ALL_RESULTS
     icons_for_queues_mapping = {}
+    queue_name_by_shortname_mapping = {}
     builder_name_to_id_mapping = {}
 
     @classmethod
@@ -96,9 +97,12 @@
     @classmethod
     def update_icons_for_queues_mapping(cls):
         config = cls.fetch_config()
+        if not config:
+            _log.warn('Unable to fetch buildbot config.json')
         for builder in config.get('builders', []):
             shortname = builder.get('shortname')
             Buildbot.icons_for_queues_mapping[shortname] = builder.get('icon')
+            Buildbot.queue_name_by_shortname_mapping[shortname] = builder.get('name')
 
     @classmethod
     def update_builder_name_to_id_mapping(cls):

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


--- trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2020-03-25 17:37:04 UTC (rev 258996)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2020-03-25 18:08:01 UTC (rev 258997)
@@ -96,6 +96,11 @@
             bubble['queue_position'] = queue_position
             if not queue_position:
                 return None
+            if self._get_parent_queue(queue):
+                queue = self._get_parent_queue(queue)
+            queue_full_name = Buildbot.queue_name_by_shortname_mapping.get(queue)
+            if queue_full_name:
+                bubble['url'] = 'https://{}/#/builders/{}'.format(config.BUILDBOT_SERVER_HOST, queue_full_name)
             bubble['details_message'] = 'Waiting in queue, processing has not started yet.\n\nPosition in queue: {}'.format(queue_position)
             return bubble
 

Modified: trunk/Tools/ChangeLog (258996 => 258997)


--- trunk/Tools/ChangeLog	2020-03-25 17:37:04 UTC (rev 258996)
+++ trunk/Tools/ChangeLog	2020-03-25 18:08:01 UTC (rev 258997)
@@ -1,3 +1,15 @@
+2020-03-25  Aakash Jain  <aakash_j...@apple.com>
+
+        [ews] status-bubble should link to buildbot queue while waiting in queue
+        https://bugs.webkit.org/show_bug.cgi?id=209543
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
+        (StatusBubble._build_bubble): Link to buildbot queue whil patch is waiting in queue.
+        * BuildSlaveSupport/ews-app/ews/common/buildbot.py:
+        (Buildbot.update_icons_for_queues_mapping): Generate the mapping for shortname to full queue name.
+
 2020-03-25  Ting-Wei Lan  <lant...@gmail.com>
 
         [GTK] Add user agent quirk for auth.mayohr.com
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to