Add sheriff details to roll commit message.
Add a link with instructions about how to assign v8 issues to the chromium roll commit message. Remove googler mapping feature as it doesn't apply anymore to any generalist sheriff. NOTRY=true Review URL: https://codereview.chromium.org/938023002 Cr-Commit-Position: refs/heads/master@{#26761}
This commit is contained in:
parent
5bbe693e48
commit
ef01ef07ab
@ -99,10 +99,9 @@ class RollChromium(Step):
|
||||
"--use-commit-queue",
|
||||
]
|
||||
if self._options.sheriff:
|
||||
args.extend([
|
||||
"--sheriff", "--googlers-mapping", self._options.googlers_mapping])
|
||||
args.append("--sheriff")
|
||||
if self._options.dry_run:
|
||||
args.extend(["--dry-run"])
|
||||
args.append("--dry-run")
|
||||
if self._options.work_dir:
|
||||
args.extend(["--work-dir", self._options.work_dir])
|
||||
self._side_effect_handler.Call(chromium_roll.ChromiumRoll().Run, args)
|
||||
|
@ -14,6 +14,10 @@ ROLL_SUMMARY = ("Summary of changes available at:\n"
|
||||
"https://chromium.googlesource.com/v8/v8/+log/%s..%s")
|
||||
|
||||
|
||||
ISSUE_MSG = (
|
||||
"""Please follow these instructions for assigning/CC'ing issues:
|
||||
https://code.google.com/p/v8-wiki/wiki/TriagingIssues""")
|
||||
|
||||
class Preparation(Step):
|
||||
MESSAGE = "Preparation."
|
||||
|
||||
@ -93,9 +97,8 @@ class UploadCL(Step):
|
||||
message.append(
|
||||
ROLL_SUMMARY % (self["last_rolled_base"][:8], self["push_base"][:8]))
|
||||
|
||||
if self["sheriff"]:
|
||||
message.append("Please reply to the V8 sheriff %s in case of problems."
|
||||
% self["sheriff"])
|
||||
message.append(ISSUE_MSG)
|
||||
|
||||
message.append("TBR=%s" % self._options.reviewer)
|
||||
self.GitCommit("\n\n".join(message),
|
||||
author=self._options.author,
|
||||
|
@ -753,16 +753,6 @@ class DetermineV8Sheriff(Step):
|
||||
if not self._options.sheriff: # pragma: no cover
|
||||
return
|
||||
|
||||
try:
|
||||
# The googlers mapping maps @google.com accounts to @chromium.org
|
||||
# accounts.
|
||||
googlers = imp.load_source('googlers_mapping',
|
||||
self._options.googlers_mapping)
|
||||
googlers = googlers.list_to_dict(googlers.get_list())
|
||||
except: # pragma: no cover
|
||||
print "Skip determining sheriff without googler mapping."
|
||||
return
|
||||
|
||||
# The sheriff determined by the rotation on the waterfall has a
|
||||
# @google.com account.
|
||||
url = "https://chromium-build.appspot.com/p/chromium/sheriff_v8.js"
|
||||
@ -771,9 +761,11 @@ class DetermineV8Sheriff(Step):
|
||||
# If "channel is sheriff", we can't match an account.
|
||||
if match:
|
||||
g_name = match.group(1)
|
||||
self["sheriff"] = googlers.get(g_name + "@google.com",
|
||||
g_name + "@chromium.org")
|
||||
self._options.reviewer = self["sheriff"]
|
||||
# Optimistically assume that google and chromium account name are the
|
||||
# same.
|
||||
self["sheriff"] = g_name + "@chromium.org"
|
||||
self._options.reviewer = ("%s,%s" %
|
||||
(self["sheriff"], self._options.reviewer))
|
||||
print "Found active sheriff: %s" % self["sheriff"]
|
||||
else:
|
||||
print "No active sheriff found."
|
||||
@ -825,8 +817,6 @@ class ScriptsBase(object):
|
||||
help="The author email used for rietveld.")
|
||||
parser.add_argument("--dry-run", default=False, action="store_true",
|
||||
help="Perform only read-only actions.")
|
||||
parser.add_argument("-g", "--googlers-mapping",
|
||||
help="Path to the script mapping google accounts.")
|
||||
parser.add_argument("-r", "--reviewer", default="",
|
||||
help="The account name to be used for reviews.")
|
||||
parser.add_argument("--sheriff", default=False, action="store_true",
|
||||
@ -851,10 +841,6 @@ class ScriptsBase(object):
|
||||
print "Bad step number %d" % options.step
|
||||
parser.print_help()
|
||||
return None
|
||||
if options.sheriff and not options.googlers_mapping: # pragma: no cover
|
||||
print "To determine the current sheriff, requires the googler mapping"
|
||||
parser.print_help()
|
||||
return None
|
||||
|
||||
# Defaults for options, common to all scripts.
|
||||
options.manual = getattr(options, "manual", True)
|
||||
|
@ -989,15 +989,17 @@ git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@123456 123
|
||||
|
||||
"""
|
||||
|
||||
def testChromiumRoll(self):
|
||||
googlers_mapping_py = "%s-mapping.py" % TEST_CONFIG["PERSISTFILE_BASENAME"]
|
||||
with open(googlers_mapping_py, "w") as f:
|
||||
f.write("""
|
||||
def list_to_dict(entries):
|
||||
return {"g_name@google.com": "c_name@chromium.org"}
|
||||
def get_list():
|
||||
pass""")
|
||||
ROLL_COMMIT_MSG = """Update V8 to version 3.22.4 (based on abc).
|
||||
|
||||
Summary of changes available at:
|
||||
https://chromium.googlesource.com/v8/v8/+log/last_rol..abc
|
||||
|
||||
Please follow these instructions for assigning/CC'ing issues:
|
||||
https://code.google.com/p/v8-wiki/wiki/TriagingIssues
|
||||
|
||||
TBR=g_name@chromium.org,reviewer@chromium.org"""
|
||||
|
||||
def testChromiumRoll(self):
|
||||
# Setup fake directory structures.
|
||||
TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory()
|
||||
TextToFile("", os.path.join(TEST_CONFIG["CHROMIUM"], ".git"))
|
||||
@ -1035,13 +1037,9 @@ def get_list():
|
||||
Cmd("git fetch origin", ""),
|
||||
Cmd("git new-branch v8-roll-push_hash", "", cwd=chrome_dir),
|
||||
Cmd("roll-dep v8 push_hash", "rolled", cb=WriteDeps, cwd=chrome_dir),
|
||||
Cmd(("git commit -am \"Update V8 to version 3.22.4 "
|
||||
"(based on abc).\n\n"
|
||||
"Summary of changes available at:\n"
|
||||
"https://chromium.googlesource.com/v8/v8/+log/last_rol..abc\n\n"
|
||||
"Please reply to the V8 sheriff c_name@chromium.org in "
|
||||
"case of problems.\n\nTBR=c_name@chromium.org\" "
|
||||
"--author \"author@chromium.org <author@chromium.org>\""),
|
||||
Cmd(("git commit -am \"%s\" "
|
||||
"--author \"author@chromium.org <author@chromium.org>\"" %
|
||||
self.ROLL_COMMIT_MSG),
|
||||
"", cwd=chrome_dir),
|
||||
Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f", "",
|
||||
cwd=chrome_dir),
|
||||
@ -1049,7 +1047,7 @@ def get_list():
|
||||
self.Expect(expectations)
|
||||
|
||||
args = ["-a", "author@chromium.org", "-c", chrome_dir,
|
||||
"--sheriff", "--googlers-mapping", googlers_mapping_py,
|
||||
"--sheriff",
|
||||
"-r", "reviewer@chromium.org",
|
||||
"--last-roll", "last_roll_hsh"]
|
||||
ChromiumRoll(TEST_CONFIG, self).Run(args)
|
||||
|
Loading…
Reference in New Issue
Block a user