Title: [258586] trunk/Tools
Revision
258586
Author
[email protected]
Date
2020-03-17 13:47:44 -0700 (Tue, 17 Mar 2020)

Log Message

[ews-app] Timestamp shown in status-bubble hover-over message is in future
https://bugs.webkit.org/show_bug.cgi?id=196628

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/events.py:
(JSONProducer.json_serialize_datetime): Keep the timestamp in UTC, instead of converting it to local time zone.
* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble.get_all_builds_for_queue): Sort the queues based on build number instead of start time, since the
timestamps for new builds might be less than timestamps for old builds which completed immediately prior to this change.

Modified Paths

Diff

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


--- trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2020-03-17 20:46:25 UTC (rev 258585)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2020-03-17 20:47:44 UTC (rev 258586)
@@ -241,7 +241,7 @@
             is_parent_build = True
         if not builds:
             return (None, None)
-        builds.sort(key=lambda build: build.started_at, reverse=True)
+        builds.sort(key=lambda build: build.number, reverse=True)
         return (builds, is_parent_build)
 
     def get_builds_for_queue(self, patch, queue):

Modified: trunk/Tools/BuildSlaveSupport/ews-build/events.py (258585 => 258586)


--- trunk/Tools/BuildSlaveSupport/ews-build/events.py	2020-03-17 20:46:25 UTC (rev 258585)
+++ trunk/Tools/BuildSlaveSupport/ews-build/events.py	2020-03-17 20:47:44 UTC (rev 258586)
@@ -20,6 +20,7 @@
 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import calendar
 import datetime
 import json
 import os
@@ -65,7 +66,7 @@
         Serializing buildbot dates into UNIX epoch timestamps.
         """
         if isinstance(obj, datetime.datetime):
-            return int(time.mktime(obj.timetuple()))
+            return int(calendar.timegm(obj.timetuple()))
 
         raise TypeError("Type %s not serializable" % type(obj))
 

Modified: trunk/Tools/ChangeLog (258585 => 258586)


--- trunk/Tools/ChangeLog	2020-03-17 20:46:25 UTC (rev 258585)
+++ trunk/Tools/ChangeLog	2020-03-17 20:47:44 UTC (rev 258586)
@@ -1,3 +1,16 @@
+2020-03-17  Aakash Jain  <[email protected]>
+
+        [ews-app] Timestamp shown in status-bubble hover-over message is in future
+        https://bugs.webkit.org/show_bug.cgi?id=196628
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/events.py:
+        (JSONProducer.json_serialize_datetime): Keep the timestamp in UTC, instead of converting it to local time zone.
+        * BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
+        (StatusBubble.get_all_builds_for_queue): Sort the queues based on build number instead of start time, since the 
+        timestamps for new builds might be less than timestamps for old builds which completed immediately prior to this change.
+
 2020-03-17  Alex Christensen  <[email protected]>
 
         Add WKUIDelegatePrivate SPI _webView:printFrame:completionHandler:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to