Changeset 258937 in webkit


Ignore:
Timestamp:
Mar 24, 2020 1:36:30 PM (4 years ago)
Author:
aakash_jain@apple.com
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.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py

    r258790 r258937  
    2424
    2525import datetime
     26import logging
    2627import re
    2728
     
    3536from ews.models.patch import Patch
    3637import ews.config as config
     38
     39_log = logging.getLogger(__name__)
    3740
    3841
     
    111114        elif build.result == Buildbot.SUCCESS:
    112115            if is_parent_build:
    113                 if patch.modified < (timezone.now() - datetime.timedelta(days=StatusBubble.DAYS_TO_CHECK)):
     116                if patch.created < (timezone.now() - datetime.timedelta(days=StatusBubble.DAYS_TO_CHECK)):
    114117                    # Do not display bubble for old patch for which no build has been reported on given queue.
    115118                    # Most likely the patch would never be processed on this queue, since either the queue was
     
    271274        from_timestamp = timezone.now() - datetime.timedelta(days=StatusBubble.DAYS_TO_CHECK)
    272275
    273         if patch.modified < from_timestamp:
     276        if patch.created < from_timestamp:
    274277            # Do not display bubble for old patch for which no build has been reported on given queue.
    275278            # Most likely the patch would never be processed on this queue, since either the queue was
     
    279282        sent = 'sent_to_commit_queue' if queue == 'commit' else 'sent_to_buildbot'
    280283        previously_sent_patches = set(Patch.objects
    281                                           .filter(modified__gte=from_timestamp)
     284                                          .filter(created__gte=from_timestamp)
    282285                                          .filter(**{sent: True})
    283286                                          .filter(obsolete=False)
    284                                           .filter(modified__lt=patch.modified))
     287                                          .filter(created__lt=patch.created))
    285288        if parent_queue:
    286289            recent_builds_parent_queue = Build.objects \
    287                                              .filter(modified__gte=from_timestamp) \
     290                                             .filter(created__gte=from_timestamp) \
    288291                                             .filter(builder_display_name=parent_queue)
    289292            processed_patches_parent_queue = set([build.patch for build in recent_builds_parent_queue])
     
    291294
    292295        recent_builds = Build.objects \
    293                             .filter(modified__gte=from_timestamp) \
     296                            .filter(created__gte=from_timestamp) \
    294297                            .filter(builder_display_name=queue)
    295298        processed_patches = set([build.patch for build in recent_builds])
     299        _log.debug('Patch: {}, queue: {}, previous patches: {}'.format(patch.patch_id, queue, previously_sent_patches - processed_patches))
    296300        return len(previously_sent_patches - processed_patches) + 1
    297301
  • trunk/Tools/ChangeLog

    r258919 r258937  
     12020-03-24  Aakash Jain  <aakash_jain@apple.com>
     2
     3        [ews] position in queue shown in status-bubble is larger than actual position
     4        https://bugs.webkit.org/show_bug.cgi?id=209481
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
     9        (StatusBubble._queue_position): Use created timestamp instead of modified.
     10
    1112020-03-24  Daniel Bates  <dabates@apple.com>
    212
Note: See TracChangeset for help on using the changeset viewer.