Title: [258937] trunk/Tools
Revision
258937
Author
[email protected]
Date
2020-03-24 13:36:30 -0700 (Tue, 24 Mar 2020)

Log Message

[ews] position in queue shown in status-bubble is larger than actual position
https://bugs.webkit.org/show_bug.cgi?id=209481

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble._queue_position): Use created timestamp instead of modified.

Modified Paths

Diff

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


--- trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2020-03-24 20:34:47 UTC (rev 258936)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2020-03-24 20:36:30 UTC (rev 258937)
@@ -23,6 +23,7 @@
 from __future__ import unicode_literals
 
 import datetime
+import logging
 import re
 
 from django.http import HttpResponse
@@ -35,7 +36,9 @@
 from ews.models.patch import Patch
 import ews.config as config
 
+_log = logging.getLogger(__name__)
 
+
 class StatusBubble(View):
     # These queue names are from shortname in https://trac.webkit.org/browser/webkit/trunk/Tools/BuildSlaveSupport/ews-build/config.json
     # FIXME: Auto-generate this list https://bugs.webkit.org/show_bug.cgi?id=195640
@@ -110,7 +113,7 @@
             bubble['details_message'] = 'Waiting for available bot to retry the build.\n\nRecent messages:' + self._steps_messages_from_multiple_builds(builds)
         elif build.result == Buildbot.SUCCESS:
             if is_parent_build:
-                if patch.modified < (timezone.now() - datetime.timedelta(days=StatusBubble.DAYS_TO_CHECK)):
+                if patch.created < (timezone.now() - datetime.timedelta(days=StatusBubble.DAYS_TO_CHECK)):
                     # Do not display bubble for old patch for which no build has been reported on given queue.
                     # Most likely the patch would never be processed on this queue, since either the queue was
                     # added after the patch was submitted, or build request for that patch was cancelled.
@@ -270,7 +273,7 @@
         # FIXME: Handle retried builds and cancelled build-requests as well.
         from_timestamp = timezone.now() - datetime.timedelta(days=StatusBubble.DAYS_TO_CHECK)
 
-        if patch.modified < from_timestamp:
+        if patch.created < from_timestamp:
             # Do not display bubble for old patch for which no build has been reported on given queue.
             # Most likely the patch would never be processed on this queue, since either the queue was
             # added after the patch was submitted, or build request for that patch was cancelled.
@@ -278,21 +281,22 @@
 
         sent = 'sent_to_commit_queue' if queue == 'commit' else 'sent_to_buildbot'
         previously_sent_patches = set(Patch.objects
-                                          .filter(modified__gte=from_timestamp)
+                                          .filter(created__gte=from_timestamp)
                                           .filter(**{sent: True})
                                           .filter(obsolete=False)
-                                          .filter(modified__lt=patch.modified))
+                                          .filter(created__lt=patch.created))
         if parent_queue:
             recent_builds_parent_queue = Build.objects \
-                                             .filter(modified__gte=from_timestamp) \
+                                             .filter(created__gte=from_timestamp) \
                                              .filter(builder_display_name=parent_queue)
             processed_patches_parent_queue = set([build.patch for build in recent_builds_parent_queue])
             return len(previously_sent_patches - processed_patches_parent_queue) + 1
 
         recent_builds = Build.objects \
-                            .filter(modified__gte=from_timestamp) \
+                            .filter(created__gte=from_timestamp) \
                             .filter(builder_display_name=queue)
         processed_patches = set([build.patch for build in recent_builds])
+        _log.debug('Patch: {}, queue: {}, previous patches: {}'.format(patch.patch_id, queue, previously_sent_patches - processed_patches))
         return len(previously_sent_patches - processed_patches) + 1
 
     def _build_bubbles_for_patch(self, patch, hide_icons=False):

Modified: trunk/Tools/ChangeLog (258936 => 258937)


--- trunk/Tools/ChangeLog	2020-03-24 20:34:47 UTC (rev 258936)
+++ trunk/Tools/ChangeLog	2020-03-24 20:36:30 UTC (rev 258937)
@@ -1,3 +1,13 @@
+2020-03-24  Aakash Jain  <[email protected]>
+
+        [ews] position in queue shown in status-bubble is larger than actual position
+        https://bugs.webkit.org/show_bug.cgi?id=209481
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
+        (StatusBubble._queue_position): Use created timestamp instead of modified.
+
 2020-03-24  Daniel Bates  <[email protected]>
 
         [iOS][WK2] Set text trait isSingleLineDocument
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to