Commit 97336b80 authored by machenbach's avatar machenbach Committed by Commit bot

Push roll candidates based on candidate ref instead of lkgr.

This pushes v8 to the candidates branch based on the
candidate ref, which is guaranteed to be the same for 8
hours.

The candidate ref is maintained by this bot:
http://build.chromium.org/p/client.v8/builders/Auto-roll%20-%20release%20process

NOTRY=true
BUG=chromium:431669
LOG=n

Review URL: https://codereview.chromium.org/760793003

Cr-Commit-Position: refs/heads/master@{#25526}
parent 4d71e0f4
...@@ -70,13 +70,12 @@ class CheckTreeStatus(Step): ...@@ -70,13 +70,12 @@ class CheckTreeStatus(Step):
% self["tree_message"]) % self["tree_message"])
class FetchLKGR(Step): class FetchCandidate(Step):
MESSAGE = "Fetching V8 LKGR." MESSAGE = "Fetching V8 roll candidate ref."
def RunStep(self): def RunStep(self):
lkgr_url = "https://v8-status.appspot.com/lkgr" self.Git("fetch origin +refs/heads/candidate:refs/heads/candidate")
# Retry several times since app engine might have issues. self["candidate"] = self.Git("show-ref -s refs/heads/candidate")
self["lkgr"] = self.ReadURL(lkgr_url, wait_plan=[5, 20, 300, 300])
class CheckLastPush(Step): class CheckLastPush(Step):
...@@ -94,8 +93,8 @@ class CheckLastPush(Step): ...@@ -94,8 +93,8 @@ class CheckLastPush(Step):
self.Die("Could not retrieve bleeding edge revision for trunk push %s" self.Die("Could not retrieve bleeding edge revision for trunk push %s"
% last_push) % last_push)
if self["lkgr"] == last_push_be: if self["candidate"] == last_push_be:
print "Already pushed current lkgr %s" % last_push_be print "Already pushed current candidate %s" % last_push_be
return True return True
...@@ -103,12 +102,12 @@ class PushToCandidates(Step): ...@@ -103,12 +102,12 @@ class PushToCandidates(Step):
MESSAGE = "Pushing to candidates if specified." MESSAGE = "Pushing to candidates if specified."
def RunStep(self): def RunStep(self):
print "Pushing lkgr %s to candidates." % self["lkgr"] print "Pushing candidate %s to candidates." % self["candidate"]
args = [ args = [
"--author", self._options.author, "--author", self._options.author,
"--reviewer", self._options.reviewer, "--reviewer", self._options.reviewer,
"--revision", self["lkgr"], "--revision", self["candidate"],
"--force", "--force",
] ]
...@@ -144,7 +143,7 @@ class AutoPush(ScriptsBase): ...@@ -144,7 +143,7 @@ class AutoPush(ScriptsBase):
Preparation, Preparation,
CheckAutoPushSettings, CheckAutoPushSettings,
CheckTreeStatus, CheckTreeStatus,
FetchLKGR, FetchCandidate,
CheckLastPush, CheckLastPush,
PushToCandidates, PushToCandidates,
] ]
......
...@@ -941,7 +941,7 @@ def get_list(): ...@@ -941,7 +941,7 @@ def get_list():
"Version 3.4.5 (based on abc123)\n"), "Version 3.4.5 (based on abc123)\n"),
]) ])
self._state["lkgr"] = "abc123" self._state["candidate"] = "abc123"
self.assertEquals(0, self.RunStep( self.assertEquals(0, self.RunStep(
auto_push.AutoPush, CheckLastPush, AUTO_PUSH_ARGS)) auto_push.AutoPush, CheckLastPush, AUTO_PUSH_ARGS))
...@@ -955,8 +955,8 @@ def get_list(): ...@@ -955,8 +955,8 @@ def get_list():
Cmd("git fetch", ""), Cmd("git fetch", ""),
URL("https://v8-status.appspot.com/current?format=json", URL("https://v8-status.appspot.com/current?format=json",
"{\"message\": \"Tree is throttled\"}"), "{\"message\": \"Tree is throttled\"}"),
URL("https://v8-status.appspot.com/lkgr", Exception("Network problem")), Cmd("git fetch origin +refs/heads/candidate:refs/heads/candidate", ""),
URL("https://v8-status.appspot.com/lkgr", "abc123"), Cmd("git show-ref -s refs/heads/candidate", "abc123"),
Cmd(("git log -1 --format=%H --grep=\"" Cmd(("git log -1 --format=%H --grep=\""
"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\"" "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\""
" origin/candidates"), "push_hash\n"), " origin/candidates"), "push_hash\n"),
...@@ -969,7 +969,7 @@ def get_list(): ...@@ -969,7 +969,7 @@ def get_list():
state = json.loads(FileToText("%s-state.json" state = json.loads(FileToText("%s-state.json"
% TEST_CONFIG["PERSISTFILE_BASENAME"])) % TEST_CONFIG["PERSISTFILE_BASENAME"]))
self.assertEquals("abc123", state["lkgr"]) self.assertEquals("abc123", state["candidate"])
def testAutoPushStoppedBySettings(self): def testAutoPushStoppedBySettings(self):
TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git")) TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment