[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
abarth at webkit.org
abarth at webkit.org
Wed Mar 17 18:43:17 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit da0662d26ea2f533d886b8f3229902da83b14f5d
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 16 05:55:38 2010 +0000
2010-03-15 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
Let commit-queue land rollout patches even when the tree is red
https://bugs.webkit.org/show_bug.cgi?id=36155
Now the commit-queue will land patches whose name begins with "ROLLOUT "
even if the tree is red. The patches still go through the usual build
and test process, but they can be landed while the tree is on fire.
* Scripts/webkitpy/bugzilla.py:
* Scripts/webkitpy/commands/queues.py:
* Scripts/webkitpy/commands/queues_unittest.py:
* Scripts/webkitpy/commands/queuestest.py:
* Scripts/webkitpy/mock_bugzillatool.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 7d72053..d5d229e 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,23 @@
Reviewed by Eric Seidel.
+ Let commit-queue land rollout patches even when the tree is red
+ https://bugs.webkit.org/show_bug.cgi?id=36155
+
+ Now the commit-queue will land patches whose name begins with "ROLLOUT "
+ even if the tree is red. The patches still go through the usual build
+ and test process, but they can be landed while the tree is on fire.
+
+ * Scripts/webkitpy/bugzilla.py:
+ * Scripts/webkitpy/commands/queues.py:
+ * Scripts/webkitpy/commands/queues_unittest.py:
+ * Scripts/webkitpy/commands/queuestest.py:
+ * Scripts/webkitpy/mock_bugzillatool.py:
+
+2010-03-15 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
Add webkit-patch post-rollout to upload rollouts to bugs.webkit.org for easy committing
https://bugs.webkit.org/show_bug.cgi?id=36154
diff --git a/WebKitTools/Scripts/webkitpy/bugzilla.py b/WebKitTools/Scripts/webkitpy/bugzilla.py
index 6bd7d82..524c471 100644
--- a/WebKitTools/Scripts/webkitpy/bugzilla.py
+++ b/WebKitTools/Scripts/webkitpy/bugzilla.py
@@ -66,6 +66,8 @@ def timestamp():
class Attachment(object):
+ rollout_preamble = "ROLLOUT of r"
+
def __init__(self, attachment_dictionary, bug):
self._attachment_dictionary = attachment_dictionary
self._bug = bug
@@ -97,6 +99,9 @@ class Attachment(object):
def is_obsolete(self):
return not not self._attachment_dictionary.get("is_obsolete")
+ def is_rollout(self):
+ return self.name().startswith(self.rollout_preamble)
+
def name(self):
return self._attachment_dictionary.get("name")
diff --git a/WebKitTools/Scripts/webkitpy/commands/queues.py b/WebKitTools/Scripts/webkitpy/commands/queues.py
index 2937fe3..0ec7ab3 100644
--- a/WebKitTools/Scripts/webkitpy/commands/queues.py
+++ b/WebKitTools/Scripts/webkitpy/commands/queues.py
@@ -151,7 +151,10 @@ class CommitQueue(AbstractQueue, StepSequenceErrorHandler):
# Not using BugzillaQueries.fetch_patches_from_commit_queue() so we can reject patches with invalid committers/reviewers.
bug_ids = self.tool.bugs.queries.fetch_bug_ids_from_commit_queue()
all_patches = sum([self.tool.bugs.fetch_bug(bug_id).commit_queued_patches(include_invalid=True) for bug_id in bug_ids], [])
- return self.committer_validator.patches_after_rejecting_invalid_commiters_and_reviewers(all_patches)
+ valid_patches = self.committer_validator.patches_after_rejecting_invalid_commiters_and_reviewers(all_patches)
+ if not self._builders_are_green():
+ return filter(lambda patch: patch.is_rollout(), valid_patches)
+ return valid_patches
def next_work_item(self):
patches = self._validate_patches_in_commit_queue()
@@ -180,12 +183,13 @@ class CommitQueue(AbstractQueue, StepSequenceErrorHandler):
return True
def should_proceed_with_work_item(self, patch):
- if not self._builders_are_green():
- return False
- if not self._can_build_and_test():
- return False
- if not self._builders_are_green():
- return False
+ if not patch.is_rollout():
+ if not self._builders_are_green():
+ return False
+ if not self._can_build_and_test():
+ return False
+ if not self._builders_are_green():
+ return False
self._update_status("Landing patch", patch)
return True
diff --git a/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py b/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py
index aa7327b..6579176 100644
--- a/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py
@@ -28,6 +28,7 @@
import os
+from webkitpy.bugzilla import Attachment
from webkitpy.commands_references import Mock
from webkitpy.commands.commandtest import CommandsTest
from webkitpy.commands.queues import *
@@ -110,6 +111,19 @@ Warning, attachment 128 on bug 42 has invalid committer (non-committer at example.c
}
self.assert_queue_outputs(CommitQueue(), expected_stderr=expected_stderr)
+ def test_rollout(self):
+ tool = MockBugzillaTool()
+ tool.buildbot.light_tree_on_fire()
+ expected_stderr = {
+ "begin_work_queue" : "CAUTION: commit-queue will discard all local changes in \"%s\"\nRunning WebKit commit-queue.\n" % os.getcwd(),
+ # 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.
+ "next_work_item" : """Warning, attachment 128 on bug 42 has invalid committer (non-committer at example.com)
+Warning, attachment 128 on bug 42 has invalid committer (non-committer at example.com)
+1 patch in commit-queue [106]
+""",
+ }
+ self.assert_queue_outputs(CommitQueue(), tool=tool, expected_stderr=expected_stderr)
+
class StyleQueueTest(QueuesTest):
def test_style_queue(self):
diff --git a/WebKitTools/Scripts/webkitpy/commands/queuestest.py b/WebKitTools/Scripts/webkitpy/commands/queuestest.py
index ea20ac7..785e364 100644
--- a/WebKitTools/Scripts/webkitpy/commands/queuestest.py
+++ b/WebKitTools/Scripts/webkitpy/commands/queuestest.py
@@ -44,8 +44,9 @@ class MockQueueEngine(object):
class QueuesTest(unittest.TestCase):
mock_work_item = Attachment({
- "id" : 1234,
- "bug_id" : 345,
+ "id": 1234,
+ "bug_id": 345,
+ "name": "Patch",
"attacher_email": "adam at example.com",
}, None)
diff --git a/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py b/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
index efabf68..d65e167 100644
--- a/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
+++ b/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
@@ -49,6 +49,7 @@ _patch1 = {
"id": 197,
"bug_id": 42,
"url": "http://example.com/197",
+ "name": "Patch1",
"is_obsolete": False,
"is_patch": True,
"review": "+",
@@ -63,6 +64,7 @@ _patch2 = {
"id": 128,
"bug_id": 42,
"url": "http://example.com/128",
+ "name": "Patch2",
"is_obsolete": False,
"is_patch": True,
"review": "+",
@@ -77,6 +79,7 @@ _patch3 = {
"id": 103,
"bug_id": 75,
"url": "http://example.com/103",
+ "name": "Patch3",
"is_obsolete": False,
"is_patch": True,
"review": "?",
@@ -88,6 +91,7 @@ _patch4 = {
"id": 104,
"bug_id": 77,
"url": "http://example.com/103",
+ "name": "Patch3",
"is_obsolete": False,
"is_patch": True,
"review": "+",
@@ -101,6 +105,7 @@ _patch5 = {
"id": 105,
"bug_id": 77,
"url": "http://example.com/103",
+ "name": "Patch5",
"is_obsolete": False,
"is_patch": True,
"review": "+",
@@ -113,6 +118,7 @@ _patch6 = { # Valid committer, but no reviewer.
"id": 106,
"bug_id": 77,
"url": "http://example.com/103",
+ "name": "ROLLOUT of r3489",
"is_obsolete": False,
"is_patch": True,
"commit-queue": "+",
@@ -125,6 +131,7 @@ _patch7 = { # Valid review, patch is marked obsolete.
"id": 107,
"bug_id": 76,
"url": "http://example.com/103",
+ "name": "Patch7",
"is_obsolete": True,
"is_patch": True,
"review": "+",
@@ -265,18 +272,26 @@ class MockBugzilla(Mock):
class MockBuildBot(Mock):
+ def __init__(self):
+ self._tree_is_on_fire = False
+
def builder_statuses(self):
return [{
"name": "Builder1",
"is_green": True,
}, {
"name": "Builder2",
- "is_green": True,
+ "is_green": not self._tree_is_on_fire,
}]
def red_core_builders_names(self):
+ if self._tree_is_on_fire:
+ return "Builder2"
return []
+ def light_tree_on_fire(self):
+ self._tree_is_on_fire = True
+
class MockSCM(Mock):
@@ -315,7 +330,7 @@ class MockSCM(Mock):
def modified_changelogs(self):
# Ideally we'd return something more interesting here. The problem is
- # that LandDiff will try to actually read the path from disk!
+ # that LandDiff will try to actually read the patch from disk!
return []
diff --git a/WebKitTools/Scripts/webkitpy/steps/postdiffforrevert.py b/WebKitTools/Scripts/webkitpy/steps/postdiffforrevert.py
index d6904ba..91c343e 100644
--- a/WebKitTools/Scripts/webkitpy/steps/postdiffforrevert.py
+++ b/WebKitTools/Scripts/webkitpy/steps/postdiffforrevert.py
@@ -28,6 +28,7 @@
import StringIO
+from webkitpy.bugzilla import Attachment
from webkitpy.steps.abstractstep import AbstractStep
@@ -36,6 +37,6 @@ class PostDiffForRevert(AbstractStep):
self._tool.bugs.add_patch_to_bug(
state["bug_id"],
StringIO.StringIO(self.cached_lookup(state, "diff")),
- "ROLLOUT of r%s" % state["revision"],
+ "%s%s" % (Attachment.rollout_preamble, state["revision"]),
mark_for_review=False,
mark_for_commit_queue=True)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list