BLEEDING_EDGE_TAGS_RE = re.compile(
r"A \/tags\/([^\s]+) \(from \/branches\/bleeding_edge\:(\d+)\)")
+OMAHA_PROXY_URL = "http://omahaproxy.appspot.com/"
def SortBranches(branches):
"""Sort branches with version number names."""
params = None
result_raw = self.ReadURL(
- "http://omahaproxy.appspot.com/all.json",
+ OMAHA_PROXY_URL + "all.json",
params,
wait_plan=[5, 20]
)
for current_os in recent_releases:
for current_version in current_os["versions"]:
- current_candidate = {
- "chrome_version": current_version["version"],
- "os": current_version["os"],
- "release_date": current_version["current_reldate"],
- "v8_version": current_version["v8_version"],
- }
+ if current_version["channel"] != "canary":
+ continue
- if current_version["channel"] == "canary":
- canaries.append(current_candidate)
+ current_candidate = self._CreateCandidate(current_version)
+ canaries.append(current_candidate)
chrome_releases = {"canaries": canaries}
self["chrome_releases"] = chrome_releases
+ def _GetGitHashForV8Version(self, v8_version):
+ if v8_version.split(".")[3]== "0":
+ return self.GitGetHashOfTag(v8_version[:-2])
+
+ return self.GitGetHashOfTag(v8_version)
+
+ def _CreateCandidate(self, current_version):
+ params = None
+ url_to_call = (OMAHA_PROXY_URL + "v8.json?version="
+ + current_version["previous_version"])
+ result_raw = self.ReadURL(
+ url_to_call,
+ params,
+ wait_plan=[5, 20]
+ )
+ previous_v8_version = json.loads(result_raw)["v8_version"]
+ v8_previous_version_hash = self._GetGitHashForV8Version(previous_v8_version)
+
+ current_v8_version = current_version["v8_version"]
+ v8_version_hash = self._GetGitHashForV8Version(current_v8_version)
+
+ current_candidate = {
+ "chrome_version": current_version["version"],
+ "os": current_version["os"],
+ "release_date": current_version["current_reldate"],
+ "v8_version": current_v8_version,
+ "v8_version_hash": v8_version_hash,
+ "v8_previous_version": previous_v8_version,
+ "v8_previous_version_hash": v8_previous_version_hash,
+ }
+ return current_candidate
+
class CleanUp(Step):
MESSAGE = "Clean up."
URL("http://omahaproxy.appspot.com/all.json", """[{
"os": "win",
"versions": [{
- "version": "1.1.1.1",
- "v8_version": "2.2.2.2",
+ "version": "2.2.2.2",
+ "v8_version": "22.2.2.2",
"current_reldate": "04/09/15",
"os": "win",
- "channel": "canary"
+ "channel": "canary",
+ "previous_version": "1.1.1.0"
}]
}]"""),
+ URL("http://omahaproxy.appspot.com/v8.json?version=1.1.1.0", """{
+ "chromium_version": "1.1.1.0",
+ "v8_version": "11.1.1.0"
+ }"""),
+ Cmd("git rev-list -1 11.1.1", "v8_previous_version_hash"),
+ Cmd("git rev-list -1 22.2.2.2", "v8_version_hash"),
Cmd("git checkout -f origin/master", ""),
Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], "")
])
expected_json = {"chrome_releases":{
"canaries": [
{
- "chrome_version": "1.1.1.1",
+ "chrome_version": "2.2.2.2",
"os": "win",
"release_date": "04/09/15",
- "v8_version": "2.2.2.2",
+ "v8_version": "22.2.2.2",
+ "v8_version_hash": "v8_version_hash",
+ "v8_previous_version": "11.1.1.0",
+ "v8_previous_version_hash": "v8_previous_version_hash"
}]},
"releases":[
{