Bug 137366

Summary: update-work-items should never delete items
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Tools / TestsAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, glenn, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch rniwa: review+

Description Alexey Proskuryakov 2014-10-02 16:18:53 PDT
Directly manipulating WorkItems from the client is confusing and racy, as the bot will continue processing even if the item is removed (and then the user can start another commit queue with the same patch by flipping cq+ back).
Comment 1 Alexey Proskuryakov 2014-10-02 16:29:19 PDT
Created attachment 239154 [details]
proposed patch
Comment 2 WebKit Commit Bot 2014-10-02 16:32:11 PDT
Attachment 239154 [details] did not pass style-queue:


ERROR: Tools/QueueStatusServer/handlers/updateworkitems.py:50:  [UpdateWorkItems._work_items_from_request] Instance of 'UpdateWorkItems' has no 'request' member  [pylint/E1101] [5]
ERROR: Tools/QueueStatusServer/model/workitems.py:75:  [WorkItems.add_work_item] Instance of 'WorkItems' has no 'key' member  [pylint/E1101] [5]
ERROR: Tools/QueueStatusServer/model/workitems.py:78:  [WorkItems.add_work_items] Instance of 'WorkItems' has no 'key' member  [pylint/E1101] [5]
Total errors found: 3 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Ryosuke Niwa 2014-10-02 16:46:09 PDT
Comment on attachment 239154 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=239154&action=review

> Tools/QueueStatusServer/handlers/updateworkitems.py:-49
>      def _parse_work_items_string(self, items_string):
> -        try:
> -            item_strings = items_string.split(" ") if items_string else []
> -            return map(int, item_strings)
> -        except ValueError:
> -            return None

Could you add a comment in the change log as to why we're removing try-except here?
Comment 4 Alexey Proskuryakov 2014-10-02 16:50:05 PDT
Committed <http://trac.webkit.org/r174248>.