Title: [258786] trunk/Tools
Revision
258786
Author
[email protected]
Date
2020-03-20 13:44:56 -0700 (Fri, 20 Mar 2020)

Log Message

[ews] Better organize patch status api data
https://bugs.webkit.org/show_bug.cgi?id=209342

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/status.py:
(Status._build_status):
(Status._build_statuses_for_patch): Updated to return dictionary instead of list.
(Status.get): Remove safe=false now that we are returning a dictionary.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/ews-app/ews/views/status.py (258785 => 258786)


--- trunk/Tools/BuildSlaveSupport/ews-app/ews/views/status.py	2020-03-20 20:40:41 UTC (rev 258785)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/views/status.py	2020-03-20 20:44:56 UTC (rev 258786)
@@ -37,7 +37,6 @@
             return {}
 
         return {
-            'name': queue,
             'state': build.result,
             'url': 'https://{}/#/builders/{}/builds/{}'.format(config.BUILDBOT_SERVER_HOST, build.builder_id, build.number),
             'timestamp': build.complete_at,
@@ -47,17 +46,17 @@
         if not patch:
             return []
 
-        statuses = []
+        statuses = {}
         if patch.sent_to_buildbot:
             for queue in StatusBubble.ALL_QUEUES:
                 status = self._build_status(patch, queue)
                 if status:
-                    statuses.append(status)
+                    statuses[queue] = status
 
         if patch.sent_to_commit_queue:
             cq_status = self._build_status(patch, 'commit')
             if cq_status:
-                statuses.insert(0, cq_status)
+                statuses['commit'] = cq_status
 
         return statuses
 
@@ -65,4 +64,4 @@
         patch_id = int(patch_id)
         patch = Patch.get_patch(patch_id)
         response_data = self._build_statuses_for_patch(patch)
-        return JsonResponse(response_data, safe=False)
+        return JsonResponse(response_data)

Modified: trunk/Tools/ChangeLog (258785 => 258786)


--- trunk/Tools/ChangeLog	2020-03-20 20:40:41 UTC (rev 258785)
+++ trunk/Tools/ChangeLog	2020-03-20 20:44:56 UTC (rev 258786)
@@ -1,3 +1,15 @@
+2020-03-20  Aakash Jain  <[email protected]>
+
+        [ews] Better organize patch status api data
+        https://bugs.webkit.org/show_bug.cgi?id=209342
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-app/ews/views/status.py:
+        (Status._build_status):
+        (Status._build_statuses_for_patch): Updated to return dictionary instead of list.
+        (Status.get): Remove safe=false now that we are returning a dictionary.
+
 2020-03-20  Tim Horton  <[email protected]>
 
         Upstream a variety of Cocoa-platform HAVE and ENABLE macros
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to