Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1922)

Unified Diff: tools/release/releases.py

Issue 1095483002: Store hashes of current and previous shipped V8 version (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed more than 80 character line Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/release/git_recipes.py ('k') | tools/release/test_scripts.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/release/releases.py
diff --git a/tools/release/releases.py b/tools/release/releases.py
index e7000ac9fcf83e0be7fc5aa58b36664c34178164..a82da2bddf5aaec98fc9518180fc47297093f9d2 100755
--- a/tools/release/releases.py
+++ b/tools/release/releases.py
@@ -60,6 +60,7 @@ DEPS_RE = re.compile(r"""^\s*(?:["']v8_revision["']: ["']"""
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."""
@@ -440,7 +441,7 @@ class RetrieveInformationOnChromeReleases(Step):
params = None
result_raw = self.ReadURL(
- "http://omahaproxy.appspot.com/all.json",
+ OMAHA_PROXY_URL + "all.json",
params,
wait_plan=[5, 20]
)
@@ -450,19 +451,47 @@ class RetrieveInformationOnChromeReleases(Step):
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."
« no previous file with comments | « tools/release/git_recipes.py ('k') | tools/release/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698