Bug 51176 - sheriff-bot should be able to do multi-revision rollouts
Summary: sheriff-bot should be able to do multi-revision rollouts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 51924
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-16 04:28 PST by Gabor Rapcsanyi
Modified: 2011-01-05 06:19 PST (History)
6 users (show)

See Also:


Attachments
proposed patch (8.12 KB, patch)
2010-12-16 05:30 PST, Gabor Rapcsanyi
eric: review-
Details | Formatted Diff | Diff
proposed_patch_v2 (8.02 KB, patch)
2011-01-04 02:17 PST, Gabor Rapcsanyi
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Rapcsanyi 2010-12-16 04:28:45 PST
The sheriff-bot should be able to do multi-revision rollouts.
The webkit-patch is ready for this after https://bugs.webkit.org/show_bug.cgi?id=33336

Eg.:
  sheriffbot rollout r123 r124 r125 Some reason
Comment 1 Gabor Rapcsanyi 2010-12-16 05:30:23 PST
Created attachment 76757 [details]
proposed patch
Comment 2 Eric Seidel (no email) 2010-12-24 01:48:49 PST
Comment on attachment 76757 [details]
proposed patch

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

Needs another round. :)

> WebKitTools/Scripts/webkitpy/tool/bot/irc_command.py:64
> +        read_revision = True
> +        rollout_reason = []
> +        # the first argument must be a revision number
> +        svn_revision_list = [args[0].lstrip("r")]
> +        if not svn_revision_list[0].isdigit():
> +            read_revision = False
> +

Please split this (arg parsing, etc.) into private (_foo()) helper functions instead of just making execute longer.

> WebKitTools/Scripts/webkitpy/tool/bot/sheriff.py:58
> +            svn_revisions = " ".join([str(int(revision)) for revision in svn_revision_list])

Um, why do str(int(?

> WebKitTools/Scripts/webkitpy/tool/bot/sheriff.py:76
> +            svn_revisions,

Please pass them individually as numbers converted to strings, instead of as a joined string.
Comment 3 Gabor Rapcsanyi 2011-01-04 02:17:14 PST
Created attachment 77872 [details]
proposed_patch_v2
Comment 4 Gabor Rapcsanyi 2011-01-04 02:20:41 PST
(In reply to comment #2)
> (From update of attachment 76757 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=76757&action=review
> 
> Needs another round. :)
> 
> > WebKitTools/Scripts/webkitpy/tool/bot/irc_command.py:64
> > +        read_revision = True
> > +        rollout_reason = []
> > +        # the first argument must be a revision number
> > +        svn_revision_list = [args[0].lstrip("r")]
> > +        if not svn_revision_list[0].isdigit():
> > +            read_revision = False
> > +
> 
> Please split this (arg parsing, etc.) into private (_foo()) helper functions instead of just making execute longer.
> 

corrected

> > WebKitTools/Scripts/webkitpy/tool/bot/sheriff.py:58
> > +            svn_revisions = " ".join([str(int(revision)) for revision in svn_revision_list])
> 
> Um, why do str(int(?
> 

Here I just check the revisions whether they are numbers and after I convert back to string for the concatenation.

> > WebKitTools/Scripts/webkitpy/tool/bot/sheriff.py:76
> > +            svn_revisions,
> 
> Please pass them individually as numbers converted to strings, instead of as a joined string.

We have to pass the revisions between apostrophes or quotes to webkit-patch, and I think that's the best place to convert them to that format.
Comment 5 Adam Barth 2011-01-05 01:35:02 PST
Comment on attachment 77872 [details]
proposed_patch_v2

Looks great!
Comment 6 Csaba Osztrogonác 2011-01-05 05:26:30 PST
(In reply to comment #5)
> (From update of attachment 77872 [details])
> Looks great!

Landed in http://trac.webkit.org/changeset/75062
Comment 7 Csaba Osztrogonác 2011-01-05 06:19:16 PST
(In reply to comment #6)
> Landed in http://trac.webkit.org/changeset/75062

And a little fix landed in http://trac.webkit.org/changeset/75063