Title: [254545] trunk/Tools
Revision
254545
Author
aakash_j...@apple.com
Date
2020-01-14 17:08:32 -0800 (Tue, 14 Jan 2020)

Log Message

[EWS] Status bubble tooltip might display success message sometimes on a failed build
https://bugs.webkit.org/show_bug.cgi?id=206180

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble._build_bubble):
(StatusBubble._most_recent_failure_message): Returns the status from failed step instead of last step.

Modified Paths

Diff

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


--- trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2020-01-15 00:26:56 UTC (rev 254544)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2020-01-15 01:08:32 UTC (rev 254545)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 Apple Inc. All rights reserved.
+# Copyright (C) 2018-2020 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -116,7 +116,7 @@
             bubble['details_message'] = 'Warning' + self._steps_messages_from_multiple_builds(builds)
         elif build.result == Buildbot.FAILURE:
             bubble['state'] = 'fail'
-            bubble['details_message'] = self._most_recent_step_message(build)
+            bubble['details_message'] = self._most_recent_failure_message(build)
         elif build.result == Buildbot.SKIPPED:
             bubble['state'] = 'none'
             bubble['details_message'] = 'The patch is no longer eligible for processing.'
@@ -203,11 +203,11 @@
                 return True
         return False
 
-    def _most_recent_step_message(self, build):
-        recent_step = build.step_set.last()
-        if not recent_step:
-            return ''
-        return recent_step.state_string
+    def _most_recent_failure_message(self, build):
+        for step in build.step_set.all().order_by('-uid'):
+            if step.result == Buildbot.FAILURE:
+                return step.state_string
+        return ''
 
     def get_latest_build_for_queue(self, patch, queue, parent_queue=None):
         builds, is_parent_build = self.get_all_builds_for_queue(patch, queue, parent_queue)

Modified: trunk/Tools/ChangeLog (254544 => 254545)


--- trunk/Tools/ChangeLog	2020-01-15 00:26:56 UTC (rev 254544)
+++ trunk/Tools/ChangeLog	2020-01-15 01:08:32 UTC (rev 254545)
@@ -1,3 +1,14 @@
+2020-01-14  Aakash Jain  <aakash_j...@apple.com>
+
+        [EWS] Status bubble tooltip might display success message sometimes on a failed build
+        https://bugs.webkit.org/show_bug.cgi?id=206180
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
+        (StatusBubble._build_bubble):
+        (StatusBubble._most_recent_failure_message): Returns the status from failed step instead of last step.
+
 2020-01-14  Jonathan Bedard  <jbed...@apple.com>
 
         test-webkitpy: Make json file creation Python 3 compatible
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to