Changeset 57137 in webkit


Ignore:
Timestamp:
Apr 6, 2010 2:59:52 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-06 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Explain how to handle rollout patches
https://bugs.webkit.org/show_bug.cgi?id=37139

We need to set expectations for how long landing rollout patches with
the commit-queue takes. The commit-queue is optimized for safety, not
performance. Also, give folks an alternative way to land patches
quickly.

In addition, improve our testing of add_patch_to_bug by having
MockBugzilla log. This caused me to tighten a bunch of tests and
notice that one of our tests wasn't being run.

  • Scripts/webkitpy/tool/commands/download_unittest.py:
  • Scripts/webkitpy/tool/commands/upload_unittest.py:
  • Scripts/webkitpy/tool/mocktool.py:
  • Scripts/webkitpy/tool/steps/postdiffforrevert.py:
Location:
trunk/WebKitTools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r57132 r57137  
     12010-04-06  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Explain how to handle rollout patches
     6        https://bugs.webkit.org/show_bug.cgi?id=37139
     7
     8        We need to set expectations for how long landing rollout patches with
     9        the commit-queue takes.  The commit-queue is optimized for safety, not
     10        performance.  Also, give folks an alternative way to land patches
     11        quickly.
     12
     13        In addition, improve our testing of add_patch_to_bug by having
     14        MockBugzilla log.  This caused me to tighten a bunch of tests and
     15        notice that one of our tests wasn't being run.
     16
     17        * Scripts/webkitpy/tool/commands/download_unittest.py:
     18        * Scripts/webkitpy/tool/commands/upload_unittest.py:
     19        * Scripts/webkitpy/tool/mocktool.py:
     20        * Scripts/webkitpy/tool/steps/postdiffforrevert.py:
     21
    1222010-04-06  Adam Barth  <abarth@webkit.org>
    223
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/download_unittest.py

    r56964 r57137  
    122122
    123123    def test_create_rollout(self):
    124         expected_stderr = "Preparing rollout for bug 42.\nUpdating working directory\nMOCK create_bug\nbug_title: REGRESSION(r852): Reason\nbug_description: http://trac.webkit.org/changeset/852 broke the build:\nReason\nRunning prepare-ChangeLog\n"
     124        expected_stderr = "Preparing rollout for bug 42.\nUpdating working directory\nMOCK create_bug\nbug_title: REGRESSION(r852): Reason\nbug_description: http://trac.webkit.org/changeset/852 broke the build:\nReason\nRunning prepare-ChangeLog\nMOCK add_patch_to_bug: bug_id=None, description=ROLLOUT of r852, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False\n-- Begin comment --\nAny committer can land this patch automatically by marking it commit-queue+.  The commit-queue will build and test the patch before landing to ensure that the rollout will be successful.  This process takes approximately 15 minutes.\n\nIf you would like to land the rollout faster, you can use the following command:\n\n  webkit-patch land-attachment ATTACHMENT_ID --no-build --no-test --ignore-builders\n\nwhere ATTACHMENT_ID is the ID of this attachment.\n-- End comment --\n"
    125125        self.assert_execute_outputs(CreateRollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr)
    126126
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/upload_unittest.py

    r57115 r57137  
    5555
    5656    def test_post(self):
    57         expected_stderr = "Running check-webkit-style\nObsoleting 2 old patches on bug 42\n"
    58         self.assert_execute_outputs(Post(), [42], expected_stderr=expected_stderr)
     57        options = Mock()
     58        options.description = "MOCK description"
     59        options.request_commit = False
     60        options.review = True
     61        expected_stderr = "Running check-webkit-style\nObsoleting 2 old patches on bug 42\nMOCK add_patch_to_bug: bug_id=42, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False\n-- Begin comment --\nNone\n-- End comment --\nMOCK: user.open_url: http://example.com/42\n"
     62        self.assert_execute_outputs(Post(), [42], options=options, expected_stderr=expected_stderr)
    5963
    60     def test_post(self):
    61         expected_stderr = "Obsoleting 2 old patches on bug 42\n"
     64    def test_land_safely(self):
     65        expected_stderr = "Obsoleting 2 old patches on bug 42\nMOCK add_patch_to_bug: bug_id=42, description=Patch for landing, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=True\n-- Begin comment --\nNone\n-- End comment --\n"
    6266        self.assert_execute_outputs(LandSafely(), [42], expected_stderr=expected_stderr)
    6367
     
    7074
    7175    def test_upload(self):
    72         expected_stderr = "Running check-webkit-style\nObsoleting 2 old patches on bug 42\nMOCK: user.open_url: http://example.com/42\n"
    73         self.assert_execute_outputs(Upload(), [42], expected_stderr=expected_stderr)
     76        options = Mock()
     77        options.description = "MOCK description"
     78        options.request_commit = False
     79        options.review = True
     80        expected_stderr = "Running check-webkit-style\nObsoleting 2 old patches on bug 42\nMOCK add_patch_to_bug: bug_id=42, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False\n-- Begin comment --\nNone\n-- End comment --\nMOCK: user.open_url: http://example.com/42\n"
     81        self.assert_execute_outputs(Upload(), [42], options=options, expected_stderr=expected_stderr)
    7482
    7583    def test_mark_bug_fixed(self):
  • trunk/WebKitTools/Scripts/webkitpy/tool/mocktool.py

    r57125 r57137  
    296296            bug_id, cc, comment_text))
    297297
     298    def add_patch_to_bug(self,
     299                         bug_id,
     300                         patch_file_object,
     301                         description,
     302                         comment_text=None,
     303                         mark_for_review=False,
     304                         mark_for_commit_queue=False,
     305                         mark_for_landing=False):
     306        log("MOCK add_patch_to_bug: bug_id=%s, description=%s, mark_for_review=%s, mark_for_commit_queue=%s, mark_for_landing=%s" %
     307            (bug_id, description, mark_for_review, mark_for_commit_queue, mark_for_landing))
     308        log("-- Begin comment --")
     309        log(comment_text)
     310        log("-- End comment --")
     311
    298312
    299313class MockBuilder(object):
  • trunk/WebKitTools/Scripts/webkitpy/tool/steps/postdiffforrevert.py

    r56508 r57137  
    3535class PostDiffForRevert(AbstractStep):
    3636    def run(self, state):
     37        comment_text = "Any committer can land this patch automatically by \
     38marking it commit-queue+.  The commit-queue will build and test \
     39the patch before landing to ensure that the rollout will be \
     40successful.  This process takes approximately 15 minutes.\n\n\
     41If you would like to land the rollout faster, you can use the \
     42following command:\n\n\
     43  webkit-patch land-attachment ATTACHMENT_ID --no-build --no-test --ignore-builders\n\n\
     44where ATTACHMENT_ID is the ID of this attachment."
    3745        self._tool.bugs.add_patch_to_bug(
    3846            state["bug_id"],
    3947            StringIO.StringIO(self.cached_lookup(state, "diff")),
    4048            "%s%s" % (Attachment.rollout_preamble, state["revision"]),
     49            comment_text=comment_text,
    4150            mark_for_review=False,
    4251            mark_for_commit_queue=True)
Note: See TracChangeset for help on using the changeset viewer.