Bug 137366 - update-work-items should never delete items
Summary: update-work-items should never delete items
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
Depends on:
Reported: 2014-10-02 16:18 PDT by Alexey Proskuryakov
Modified: 2014-10-02 16:50 PDT (History)
3 users (show)

See Also:

proposed patch (18.18 KB, patch)
2014-10-02 16:29 PDT, Alexey Proskuryakov
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.