Changeset 56133 in webkit


Ignore:
Timestamp:
Mar 17, 2010 4:39:44 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-03-17 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Change post-rollout to create-rollout and have it make a new bug
instead of posting the rollout to the old bug.
https://bugs.webkit.org/show_bug.cgi?id=36250

The new bug blocks the old bug instead of adding more complexity to the
old bug. One tricky question is whether to create the bug if we're
unable to create a rollout patch. In this patch, we do create the bug,
but we might revist this question in the future.

  • Scripts/webkitpy/bugzilla.py:
  • Scripts/webkitpy/commands/download.py:
  • Scripts/webkitpy/commands/download_unittest.py:
  • Scripts/webkitpy/steps/createbug.py:
Location:
trunk/WebKitTools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r56132 r56133  
    66
    77        * Scripts/webkitpy/committers.py:
     8
     92010-03-17  Adam Barth  <abarth@webkit.org>
     10
     11        Reviewed by Eric Seidel.
     12
     13        Change post-rollout to create-rollout and have it make a new bug
     14        instead of posting the rollout to the old bug.
     15        https://bugs.webkit.org/show_bug.cgi?id=36250
     16
     17        The new bug blocks the old bug instead of adding more complexity to the
     18        old bug.  One tricky question is whether to create the bug if we're
     19        unable to create a rollout patch.  In this patch, we do create the bug,
     20        but we might revist this question in the future.
     21
     22        * Scripts/webkitpy/bugzilla.py:
     23        * Scripts/webkitpy/commands/download.py:
     24        * Scripts/webkitpy/commands/download_unittest.py:
     25        * Scripts/webkitpy/steps/createbug.py:
    826
    9272010-03-17  Adam Barth  <abarth@webkit.org>
  • trunk/WebKitTools/Scripts/webkitpy/bugzilla.py

    r56040 r56133  
    599599                   patch_description=None,
    600600                   cc=None,
     601                   blocked=None,
    601602                   mark_for_review=False,
    602603                   mark_for_commit_queue=False):
     
    616617        if component not in component_names:
    617618            component = self.prompt_for_component(component_names)
    618         self.browser['component'] = [component]
     619        self.browser["component"] = [component]
    619620        if cc:
    620             self.browser['cc'] = cc
    621         self.browser['short_desc'] = bug_title
    622         self.browser['comment'] = bug_description
     621            self.browser["cc"] = cc
     622        if blocked:
     623            self.browser["blocked"] = blocked
     624        self.browser["short_desc"] = bug_title
     625        self.browser["comment"] = bug_description
    623626
    624627        if patch_file_object:
  • trunk/WebKitTools/Scripts/webkitpy/commands/download.py

    r56034 r56133  
    3636from webkitpy.bugzilla import parse_bug_id
    3737# We could instead use from modules import buildsteps and then prefix every buildstep with "buildsteps."
    38 from webkitpy.changelogs import ChangeLog
     38from webkitpy.changelogs import ChangeLog, view_source_url
    3939from webkitpy.commands.abstractsequencedcommand import AbstractSequencedCommand
    4040from webkitpy.comments import bug_comment_from_commit_text
     
    279279
    280280
    281 class PostRollout(AbstractRolloutPrepCommand):
    282     name = "post-rollout"
    283     help_text = "Prepare a rollout of the given revision and upload it to the bug."
    284     steps = [
    285         steps.CleanWorkingDirectory,
    286         steps.Update,
    287         steps.RevertRevision,
     281class CreateRollout(AbstractRolloutPrepCommand):
     282    name = "create-rollout"
     283    help_text = "Creates a bug to track a broken SVN revision and uploads a rollout patch."
     284    steps = [
     285        steps.CreateBug,
     286        steps.CleanWorkingDirectory,
     287        steps.Update,
     288        steps.RevertRevision, # Notice that we still create the bug if this step fails.
    288289        steps.PrepareChangeLogForRevert,
    289         # FIXME: If there's no bug number, we should make a new bug.
    290290        steps.PostDiffForRevert,
    291291    ]
     292
     293    def _prepare_state(self, options, args, tool):
     294        state = AbstractRolloutPrepCommand._prepare_state(self, options, args, tool)
     295        # Currently, state["bug_id"] points to the bug that caused the
     296        # regression.  We want to create a new bug that blocks the old bug
     297        # so we move state["bug_id"] to state["bug_blocked"] and delete the
     298        # old state["bug_id"] so that steps.CreateBug will actually create
     299        # the new bug that we want (and subsequently store its bug id into
     300        # state["bug_id"])
     301        state["bug_blocked"] = state["bug_id"]
     302        del state["bug_id"]
     303        state["bug_title"] = "REGRESSION(r%s): %s" % (state["revision"], state["reason"])
     304        state["bug_description"] = "%s broke the build:\n%s"
     305        # FIXME: If we had more context here, we could link to other open bugs
     306        #        that mention the test that regressed.
     307        if options.parent_command == "sheriff-bot":
     308            state["bug_description"] += """
     309
     310This is an automatic bug report generated by the sheriff-bot. If this bug
     311report was created because of a flaky test, please file a bug for the flaky
     312test (if we don't already have one on file) and dup this bug against that bug
     313so that we can track how often these flaky tests case pain.
     314
     315"Only you can prevent forest fires." -- Smokey the Bear
     316""" % (state["reason"], view_source_url(state["revision"]))
     317        return state
    292318
    293319
  • trunk/WebKitTools/Scripts/webkitpy/commands/download_unittest.py

    r56034 r56133  
    121121        self.assert_execute_outputs(PrepareRollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr)
    122122
    123     def test_post_rollout(self):
     123    def test_create_rollout(self):
    124124        expected_stderr="Preparing rollout for bug 12345.\nUpdating working directory\nRunning prepare-ChangeLog\n"
    125         self.assert_execute_outputs(PrepareRollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr)
     125        self.assert_execute_outputs(CreateRollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr)
    126126
    127127    def test_rollout(self):
  • trunk/WebKitTools/Scripts/webkitpy/steps/createbug.py

    r52714 r56133  
    4343        if state.get("bug_id"):
    4444            return
    45         state["bug_id"] = self._tool.bugs.create_bug(state["bug_title"], state["bug_description"], component=self._options.component, cc=self._options.cc)
     45        state["bug_id"] = self._tool.bugs.create_bug(state["bug_title"], state["bug_description"], blocked=state.get("bug_blocked"), component=self._options.component, cc=self._options.cc)
Note: See TracChangeset for help on using the changeset viewer.