Changeset 56040 in webkit
- Timestamp:
- Mar 15, 2010 10:55:38 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r56034 r56040 1 2010-03-15 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Let commit-queue land rollout patches even when the tree is red 6 https://bugs.webkit.org/show_bug.cgi?id=36155 7 8 Now the commit-queue will land patches whose name begins with "ROLLOUT " 9 even if the tree is red. The patches still go through the usual build 10 and test process, but they can be landed while the tree is on fire. 11 12 * Scripts/webkitpy/bugzilla.py: 13 * Scripts/webkitpy/commands/queues.py: 14 * Scripts/webkitpy/commands/queues_unittest.py: 15 * Scripts/webkitpy/commands/queuestest.py: 16 * Scripts/webkitpy/mock_bugzillatool.py: 17 1 18 2010-03-15 Adam Barth <abarth@webkit.org> 2 19 -
trunk/WebKitTools/Scripts/webkitpy/bugzilla.py
r55969 r56040 67 67 class Attachment(object): 68 68 69 rollout_preamble = "ROLLOUT of r" 70 69 71 def __init__(self, attachment_dictionary, bug): 70 72 self._attachment_dictionary = attachment_dictionary … … 97 99 def is_obsolete(self): 98 100 return not not self._attachment_dictionary.get("is_obsolete") 101 102 def is_rollout(self): 103 return self.name().startswith(self.rollout_preamble) 99 104 100 105 def name(self): -
trunk/WebKitTools/Scripts/webkitpy/commands/queues.py
r55880 r56040 152 152 bug_ids = self.tool.bugs.queries.fetch_bug_ids_from_commit_queue() 153 153 all_patches = sum([self.tool.bugs.fetch_bug(bug_id).commit_queued_patches(include_invalid=True) for bug_id in bug_ids], []) 154 return self.committer_validator.patches_after_rejecting_invalid_commiters_and_reviewers(all_patches) 154 valid_patches = self.committer_validator.patches_after_rejecting_invalid_commiters_and_reviewers(all_patches) 155 if not self._builders_are_green(): 156 return filter(lambda patch: patch.is_rollout(), valid_patches) 157 return valid_patches 155 158 156 159 def next_work_item(self): … … 181 184 182 185 def should_proceed_with_work_item(self, patch): 183 if not self._builders_are_green(): 184 return False 185 if not self._can_build_and_test(): 186 return False 187 if not self._builders_are_green(): 188 return False 186 if not patch.is_rollout(): 187 if not self._builders_are_green(): 188 return False 189 if not self._can_build_and_test(): 190 return False 191 if not self._builders_are_green(): 192 return False 189 193 self._update_status("Landing patch", patch) 190 194 return True -
trunk/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py
r55968 r56040 29 29 import os 30 30 31 from webkitpy.bugzilla import Attachment 31 32 from webkitpy.commands_references import Mock 32 33 from webkitpy.commands.commandtest import CommandsTest … … 111 112 self.assert_queue_outputs(CommitQueue(), expected_stderr=expected_stderr) 112 113 114 def test_rollout(self): 115 tool = MockBugzillaTool() 116 tool.buildbot.light_tree_on_fire() 117 expected_stderr = { 118 "begin_work_queue" : "CAUTION: commit-queue will discard all local changes in \"%s\"\nRunning WebKit commit-queue.\n" % os.getcwd(), 119 # FIXME: The commit-queue warns about bad committers twice. This is due to the fact that we access Attachment.reviewer() twice and it logs each time. 120 "next_work_item" : """Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com) 121 Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com) 122 1 patch in commit-queue [106] 123 """, 124 } 125 self.assert_queue_outputs(CommitQueue(), tool=tool, expected_stderr=expected_stderr) 126 113 127 114 128 class StyleQueueTest(QueuesTest): -
trunk/WebKitTools/Scripts/webkitpy/commands/queuestest.py
r55968 r56040 45 45 class QueuesTest(unittest.TestCase): 46 46 mock_work_item = Attachment({ 47 "id" : 1234, 48 "bug_id" : 345, 47 "id": 1234, 48 "bug_id": 345, 49 "name": "Patch", 49 50 "attacher_email": "adam@example.com", 50 51 }, None) -
trunk/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
r55968 r56040 50 50 "bug_id": 42, 51 51 "url": "http://example.com/197", 52 "name": "Patch1", 52 53 "is_obsolete": False, 53 54 "is_patch": True, … … 64 65 "bug_id": 42, 65 66 "url": "http://example.com/128", 67 "name": "Patch2", 66 68 "is_obsolete": False, 67 69 "is_patch": True, … … 78 80 "bug_id": 75, 79 81 "url": "http://example.com/103", 82 "name": "Patch3", 80 83 "is_obsolete": False, 81 84 "is_patch": True, … … 89 92 "bug_id": 77, 90 93 "url": "http://example.com/103", 94 "name": "Patch3", 91 95 "is_obsolete": False, 92 96 "is_patch": True, … … 102 106 "bug_id": 77, 103 107 "url": "http://example.com/103", 108 "name": "Patch5", 104 109 "is_obsolete": False, 105 110 "is_patch": True, … … 114 119 "bug_id": 77, 115 120 "url": "http://example.com/103", 121 "name": "ROLLOUT of r3489", 116 122 "is_obsolete": False, 117 123 "is_patch": True, … … 126 132 "bug_id": 76, 127 133 "url": "http://example.com/103", 134 "name": "Patch7", 128 135 "is_obsolete": True, 129 136 "is_patch": True, … … 266 273 class MockBuildBot(Mock): 267 274 275 def __init__(self): 276 self._tree_is_on_fire = False 277 268 278 def builder_statuses(self): 269 279 return [{ … … 272 282 }, { 273 283 "name": "Builder2", 274 "is_green": True,284 "is_green": not self._tree_is_on_fire, 275 285 }] 276 286 277 287 def red_core_builders_names(self): 288 if self._tree_is_on_fire: 289 return "Builder2" 278 290 return [] 291 292 def light_tree_on_fire(self): 293 self._tree_is_on_fire = True 279 294 280 295 … … 316 331 def modified_changelogs(self): 317 332 # Ideally we'd return something more interesting here. The problem is 318 # that LandDiff will try to actually read the pat h from disk!333 # that LandDiff will try to actually read the patch from disk! 319 334 return [] 320 335 -
trunk/WebKitTools/Scripts/webkitpy/steps/postdiffforrevert.py
r56034 r56040 29 29 import StringIO 30 30 31 from webkitpy.bugzilla import Attachment 31 32 from webkitpy.steps.abstractstep import AbstractStep 32 33 … … 37 38 state["bug_id"], 38 39 StringIO.StringIO(self.cached_lookup(state, "diff")), 39 " ROLLOUT of r%s" % state["revision"],40 "%s%s" % (Attachment.rollout_preamble, state["revision"]), 40 41 mark_for_review=False, 41 42 mark_for_commit_queue=True)
Note: See TracChangeset
for help on using the changeset viewer.