Changeset 174009 in webkit


Ignore:
Timestamp:
Sep 26, 2014 9:58:41 AM (10 years ago)
Author:
ap@apple.com
Message:

Get rid of Retry status in webkit-queues
https://bugs.webkit.org/show_bug.cgi?id=137135

Reviewed by Ryosuke Niwa.

  • QueueStatusServer/config/messages.py: Removed Retry.
  • QueueStatusServer/handlers/releasepatch.py: This is now straightforward, as it

no longer needs to check the latest status. It just always both unlocks the patch
and removes it from WorkItems.

  • QueueStatusServer/handlers/submittoews.py: (SubmitToEWS._should_add_to_ews_queue):

I don't understand why we even needed to check for retries here, but now that there
are no retries, that code can go to /dev/null.

  • QueueStatusServer/loggers/recordpatchevent.py:

(RecordPatchEvent.started):
(RecordPatchEvent.retrying): Deleted.
Fixed retry counting, it should work for all queues now.

  • QueueStatusServer/model/queuestatus.py:

(QueueStatus.is_retry_request): Deleted. These are no more.

  • Scripts/webkitpy/common/net/statusserver_mock.py:

(MockStatusServer.release_lock):

  • Scripts/webkitpy/tool/commands/queues_unittest.py:

Did whatever it took to keep passing the tests. The particular test doesn't seem
quite right, but whatever.

  • Scripts/webkitpy/tool/commands/queues.py:

(CommitQueue.process_work_item): Instead of posting a retry status, just unlock
and let others pick up. Also, added explicit returns for clarity.
(AbstractPatchQueue._did_retry): Deleted.

Location:
trunk/Tools
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r174005 r174009  
     12014-09-26  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Get rid of Retry status in webkit-queues
     4        https://bugs.webkit.org/show_bug.cgi?id=137135
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * QueueStatusServer/config/messages.py: Removed Retry.
     9
     10        * QueueStatusServer/handlers/releasepatch.py: This is now straightforward, as it
     11        no longer needs to check the latest status. It just always both unlocks the patch
     12        and removes it from WorkItems.
     13
     14        * QueueStatusServer/handlers/submittoews.py: (SubmitToEWS._should_add_to_ews_queue):
     15        I don't understand why we even needed to check for retries here, but now that there
     16        are no retries, that code can go to /dev/null.
     17
     18        * QueueStatusServer/loggers/recordpatchevent.py:
     19        (RecordPatchEvent.started):
     20        (RecordPatchEvent.retrying): Deleted.
     21        Fixed retry counting, it should work for all queues now.
     22
     23        * QueueStatusServer/model/queuestatus.py:
     24        (QueueStatus.is_retry_request): Deleted. These are no more.
     25
     26        * Scripts/webkitpy/common/net/statusserver_mock.py:
     27        (MockStatusServer.release_lock):
     28        * Scripts/webkitpy/tool/commands/queues_unittest.py:
     29        Did whatever it took to keep passing the tests. The particular test doesn't seem
     30        quite right, but whatever.
     31
     32        * Scripts/webkitpy/tool/commands/queues.py:
     33        (CommitQueue.process_work_item): Instead of posting a retry status, just unlock
     34        and let others pick up. Also, added explicit returns for clarity.
     35        (AbstractPatchQueue._did_retry): Deleted.
     36
    1372014-09-26  Csaba Osztrogonác  <ossy@webkit.org>
    238
  • trunk/Tools/QueueStatusServer/app.yaml

    r173979 r174009  
    11application: webkit-queues
    2 version: 173979 # Bugzilla bug ID of last major change
     2version: 174009 # Bugzilla bug ID of last major change
    33runtime: python
    44api_version: 1
  • trunk/Tools/QueueStatusServer/config/messages.py

    r140513 r174009  
    3030pass_status = "Pass"
    3131fail_status = "Fail"
    32 retry_status = "Retry"
    3332error_status = "Error"
  • trunk/Tools/QueueStatusServer/handlers/releasepatch.py

    r140513 r174009  
    5555        # WorkItems and ActiveWorkItems.
    5656
    57         # Only remove it from the queue if the last message is not a retry request.
    58         # Allow removing it from the queue even if there is no last_status for easier testing.
    59         if not last_status or not last_status.is_retry_request():
    60             queue.work_items().remove_work_item(attachment_id)
    61             RecordPatchEvent.stopped(attachment_id, queue_name)
    62         else:
    63             RecordPatchEvent.retrying(attachment_id, queue_name)
     57        queue.work_items().remove_work_item(attachment_id)
     58        RecordPatchEvent.stopped(attachment_id, queue_name)
    6459
    65         # Always release the lock on the item.
    6660        queue.active_work_items().expire_item(attachment_id)
  • trunk/Tools/QueueStatusServer/handlers/submittoews.py

    r141739 r174009  
    4646        assert(queue.is_ews())
    4747        latest_status = attachment.status_for_queue(queue)
    48         if not latest_status:
    49             return True
    50         # Only ever re-submit to the EWS if the EWS specifically requested a retry.
    51         # This allows us to restart the EWS feeder queue, without all r? patches
    52         # being retried as a result of that restart!
    53         # In some future version we might add a "force" button to allow the user
    54         # to override this restriction.
    55         return latest_status.is_retry_request()
     48        # The feeder queue only submits each patch once normally, but it loses its memory
     49        # when restarted. We do not want to re-add all patches if that happens.
     50        # In the future we might add a "force" button to allow the user to retry patches
     51        # that were previously submitted.
     52        return not latest_status
    5653
    5754    def _add_attachment_to_ews_queues(self, attachment):
  • trunk/Tools/QueueStatusServer/loggers/recordpatchevent.py

    r141590 r174009  
    11# Copyright (C) 2013 Google Inc. All rights reserved.
     2# Copyright (C) 2014 Apple Inc. All rights reserved.
    23#
    34# Redistribution and use in source and binary forms, with or without
     
    4243
    4344    @classmethod
    44     def retrying(cls, attachment_id, queue_name, bot_id=None):
    45         patch_log = PatchLog.lookup_if_exists(attachment_id, queue_name)
    46         if not patch_log:
    47             WarningLog.record("patchlog missing", "In retrying event.", attachment_id, queue_name, bot_id)
    48             return
    49 
    50         if bot_id:
    51             patch_log.bot_id = bot_id
    52         patch_log.retry_count += 1
    53         patch_log.put()
    54 
    55         queue_log = QueueLog.get_current(queue_name, queue_log_duration)
    56         queue_log.patch_retry_count += 1
    57         queue_log.put()
    58 
    59     @classmethod
    6045    def started(cls, attachment_id, queue_name, bot_id=None):
    6146        patch_log = PatchLog.lookup_if_exists(attachment_id, queue_name)
     
    6449            return
    6550
    66         # An existing wait_duration implies the patch had been started previously and is being picked up again because it had expired.
    67         if not patch_log.wait_duration:
    68             if bot_id:
    69                 patch_log.bot_id = bot_id
     51        if bot_id:
     52            patch_log.bot_id = bot_id
     53
     54        # An existing wait_duration implies the patch had been started previously and is
     55        # being picked up again because it had expired, or was released.
     56        if patch_log.wait_duration:
     57            patch_log.retry_count += 1
     58            patch_log.put()
     59
     60            queue_log = QueueLog.get_current(queue_name, queue_log_duration)
     61            queue_log.patch_retry_count += 1
     62            queue_log.put()
     63        else:
    7064            patch_log.calculate_wait_duration()
    7165            patch_log.put()
  • trunk/Tools/QueueStatusServer/model/queuestatus.py

    r140513 r174009  
    4141    date = db.DateTimeProperty(auto_now_add=True)
    4242    results_file = db.BlobProperty()
    43 
    44     def is_retry_request(self):
    45         return self.message == messages.retry_status
  • trunk/Tools/Scripts/webkitpy/common/net/statusserver_mock.py

    r135912 r174009  
    5353        _log.info("MOCK: release_work_item: %s %s" % (queue_name, patch.id()))
    5454
     55    def release_lock(self, queue_name, patch):
     56        _log.info("MOCK: release_lock: %s %s" % (queue_name, patch.id()))
     57
    5558    def update_work_items(self, queue_name, work_items):
    5659        self._work_items = work_items
  • trunk/Tools/Scripts/webkitpy/tool/commands/queues.py

    r173979 r174009  
    6666    _pass_status = "Pass"
    6767    _fail_status = "Fail"
    68     _retry_status = "Retry"
    6968    _error_status = "Error"
    7069
     
    240239        self._release_work_item(patch)
    241240
    242     def _did_retry(self, patch):
    243         self._update_status(self._retry_status, patch)
    244         self._release_work_item(patch)
    245 
    246241    def _did_error(self, patch, reason):
    247242        message = "%s: %s" % (self._error_status, reason)
     
    326321                self._did_pass(patch)
    327322                return True
    328             self._did_retry(patch)
     323            self._unlock_patch(patch)
     324            return False
    329325        except ScriptError, e:
    330326            validator = CommitterValidator(self._tool)
     
    334330                self._upload_results_archive_for_patch(patch, results_archive)
    335331            self._did_fail(patch)
     332            return False
    336333
    337334    def _failing_tests_message(self, task, patch):
  • trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py

    r153535 r174009  
    406406Running: webkit-patch --status-host=example.com build-and-test --no-clean --no-update --test --non-interactive --port=mac
    407407MOCK: update_status: commit-queue Passed tests
    408 MOCK: update_status: commit-queue Retry
    409 MOCK: release_work_item: commit-queue 10000
     408MOCK: release_lock: commit-queue 10000
    410409"""
    411410        self.maxDiff = None
Note: See TracChangeset for help on using the changeset viewer.