Bug 64185 - garden-o-matic should be able to roll out patches
Summary: garden-o-matic should be able to roll out patches
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 64183
  Show dependency treegraph
 
Reported: 2011-07-08 11:15 PDT by Adam Barth
Modified: 2011-07-12 13:20 PDT (History)
0 users

See Also:


Attachments
work in progress (1.93 KB, patch)
2011-07-09 14:35 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
work in progress (4.57 KB, patch)
2011-07-10 07:59 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch (5.93 KB, patch)
2011-07-10 08:45 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2011-07-08 11:15:39 PDT
We already have a bunch of infrastructure for rolling out patches.  The local server can either use the local working copy or ask one of the bots to perform the rollout.
Comment 1 Adam Barth 2011-07-09 14:35:09 PDT
Created attachment 100218 [details]
work in progress
Comment 2 Adam Barth 2011-07-10 07:59:27 PDT
Created attachment 100225 [details]
work in progress
Comment 3 Adam Barth 2011-07-10 08:45:23 PDT
Created attachment 100226 [details]
Patch
Comment 4 Eric Seidel (no email) 2011-07-10 12:26:50 PDT
Comment on attachment 100226 [details]
Patch

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

I'm not sure I believe in this config object, and I think tool should be held separate.  But the change looks good.

> Tools/Scripts/webkitpy/tool/commands/gardenomatic.py:38
> +    def _prepare_config(self, options, args, tool):
> +        return {
> +            'tool': tool,
> +        }

Odd.  I would think we would pass a tool around anyway as its own argument.

> Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:47
> +    def __init__(self, server):
> +        self.server = server

pylint is going to get mad that we don't call the original __init__.  YOu shoudl call the original __init__ with mocks from this one.

> Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:58
> +    def test_empty_state(self):
> +        expected_stderr = "MOCK run_command: ['echo', 'rollout', '--force-clean', '--non-interactive', '2314', 'MOCK rollout reason']\n"
> +        self._post_to_path("/rollout?revision=2314&reason=MOCK+rollout+reason", expected_stderr=expected_stderr)

Very slick.
Comment 5 Adam Barth 2011-07-10 12:47:58 PDT
Comment on attachment 100226 [details]
Patch

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

>> Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:47
>> +# The real GardeningHTTPRequestHandler has a constructor that's too hard to
>> +# call in a unit test, so we create a subclass that's easier to constrcut.
>> +class TestGardeningHTTPRequestHandler(GardeningHTTPRequestHandler):
>> +    def __init__(self, server):
>> +        self.server = server
> 
> pylint is going to get mad that we don't call the original __init__.  YOu shoudl call the original __init__ with mocks from this one.

As the comment says, the entire point of this class is to avoid calling the original __init__.
Comment 6 Adam Barth 2011-07-11 10:51:07 PDT
Comment on attachment 100226 [details]
Patch

Clearing flags on attachment: 100226

Committed r90762: <http://trac.webkit.org/changeset/90762>
Comment 7 Adam Barth 2011-07-11 10:51:11 PDT
All reviewed patches have been landed.  Closing bug.