Reviewers: tandrii(chromium), hablich,

Message:
PTAL. CC'ed everybody who's name is now hard-coded in the
script. If you think that is a bad idea, please speak up.

This should help getting issues faster assigned to the right
people (i.e. not always to me).

Description:
Add sheriff details to roll commit message.

Add list of specialist sheriffs to chromium roll commit
message.

Add generalist sheriff to commit message if available.

Remove googler mapping feature as it doesn't apply anymore
to any generalist sheriff.

[email protected]

Please review this at https://codereview.chromium.org/938023002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+45, -40 lines):
  M tools/release/auto_roll.py
  M tools/release/chromium_roll.py
  M tools/release/common_includes.py
  M tools/release/test_scripts.py


Index: tools/release/auto_roll.py
diff --git a/tools/release/auto_roll.py b/tools/release/auto_roll.py
index 315a4bc2a0a16f18863fbc85109fb5aae50664bc..ba8d298fb2d5f0994694cf9516251c1c205a763e 100755
--- a/tools/release/auto_roll.py
+++ b/tools/release/auto_roll.py
@@ -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)
Index: tools/release/chromium_roll.py
diff --git a/tools/release/chromium_roll.py b/tools/release/chromium_roll.py
index 8a3ff4a0a7c8695dc1ff43a50cbb13a27669780d..42035a8135582cb185fdcaf67f4d4911306f78d9 100755
--- a/tools/release/chromium_roll.py
+++ b/tools/release/chromium_roll.py
@@ -14,6 +14,18 @@ ROLL_SUMMARY = ("Summary of changes available at:\n"
                 "https://chromium.googlesource.com/v8/v8/+log/%s..%s";)


+SPECIALTY_SHERIFF_MSG = (
+"""Please assign any issues to the V8 specialty sheriffs of one of the
+following categories:
+
+Stability: [email protected]
+Performance: [email protected], [email protected]
+Clusterfuzz: [email protected], [email protected]
+
+Please CC [email protected] on all issues.""")
+
+GENERALIST_SHERIFF_MSG = "Assign remaining issues to the V8 sheriff %s"
+
 class Preparation(Step):
   MESSAGE = "Preparation."

@@ -93,9 +105,11 @@ class UploadCL(Step):
     message.append(
ROLL_SUMMARY % (self["last_rolled_base"][:8], self["push_base"][:8]))

+    message.append(SPECIALTY_SHERIFF_MSG)
+
     if self["sheriff"]:
- message.append("Please reply to the V8 sheriff %s in case of problems."
-          % self["sheriff"])
+      message.append(GENERALIST_SHERIFF_MSG % self["sheriff"])
+
     message.append("TBR=%s" % self._options.reviewer)
     self.GitCommit("\n\n".join(message),
                    author=self._options.author,
Index: tools/release/common_includes.py
diff --git a/tools/release/common_includes.py b/tools/release/common_includes.py index bae05bc6b542a2c41d4bb9773bc8ecfc3fc97068..28025279cd8284ecc8832b0b9383458f08dc7d86 100644
--- a/tools/release/common_includes.py
+++ b/tools/release/common_includes.py
@@ -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)
Index: tools/release/test_scripts.py
diff --git a/tools/release/test_scripts.py b/tools/release/test_scripts.py
index 3beddfd936cc5ebe8b152c6ad442aa66ceceec5a..92160476a300a8a89bd563371907d62a1df4bdf2 100644
--- a/tools/release/test_scripts.py
+++ b/tools/release/test_scripts.py
@@ -989,15 +989,25 @@ 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 {"[email protected]": "[email protected]"}
-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 assign any issues to the V8 specialty sheriffs of one of the
+following categories:
+
+Stability: [email protected]
+Performance: [email protected], [email protected]
+Clusterfuzz: [email protected], [email protected]

+Please CC [email protected] on all issues.
+
+Assign remaining issues to the V8 sheriff [email protected]
+
[email protected],[email protected]"""
+
+  def testChromiumRoll(self):
     # Setup fake directory structures.
     TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory()
     TextToFile("", os.path.join(TEST_CONFIG["CHROMIUM"], ".git"))
@@ -1035,13 +1045,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 [email protected] in "
-           "case of problems.\n\[email protected]\" "
-           "--author \"[email protected] <[email protected]>\""),
+      Cmd(("git commit -am \"%s\" "
+           "--author \"[email protected] <[email protected]>\"" %
+           self.ROLL_COMMIT_MSG),
           "", cwd=chrome_dir),
Cmd("git cl upload --send-mail --email \"[email protected]\" -f", "",
           cwd=chrome_dir),
@@ -1049,7 +1055,7 @@ def get_list():
     self.Expect(expectations)

     args = ["-a", "[email protected]", "-c", chrome_dir,
-            "--sheriff", "--googlers-mapping", googlers_mapping_py,
+            "--sheriff",
             "-r", "[email protected]",
             "--last-roll", "last_roll_hsh"]
     ChromiumRoll(TEST_CONFIG, self).Run(args)


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to