[release-tools] Fix possible race condition in retrieval of latest rolled version
authorhablich <hablich@chromium.org>
Fri, 19 Jun 2015 09:11:49 +0000 (02:11 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 19 Jun 2015 09:12:07 +0000 (09:12 +0000)
R=machenbach@chromium.org
BUG=
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29137}

tools/release/auto_roll.py
tools/release/test_scripts.py

index f7692cf..ed2ab21 100755 (executable)
@@ -48,6 +48,9 @@ class DetectLastRoll(Step):
         max_age=self._options.max_age * DAY_IN_SECONDS)
     assert revisions, "Didn't find any recent release."
 
+    # Update Chromium checkout before DEPS check to fix possible race-condition
+    self.GitPull(cwd=self._options.chromium)
+
     # Interpret the DEPS file to retrieve the v8 revision.
     # TODO(machenbach): This should be part or the roll-deps api of
     # depot_tools.
index 32d0fb8..da4f2d1 100644 (file)
@@ -1112,6 +1112,7 @@ deps = {
       Cmd("git describe --tags bad_tag", ""),
       Cmd("git describe --tags hash_234", "3.22.4"),
       Cmd("git describe --tags hash_123", "3.22.3"),
+      Cmd("git pull", "", cwd=TEST_CONFIG["CHROMIUM"]),
       Cmd("git describe --tags abcd123455", "3.22.4"),
       Cmd("git describe --tags hash_234", "3.22.4"),
       Cmd("git describe --tags hash_123", "3.22.3"),
@@ -1135,6 +1136,7 @@ deps = {
       Cmd("git describe --tags bad_tag", ""),
       Cmd("git describe --tags hash_234", "3.22.4"),
       Cmd("git describe --tags hash_123", "3.22.3"),
+      Cmd("git pull", "", cwd=TEST_CONFIG["CHROMIUM"]),
       Cmd("git describe --tags abcd123455", "3.22.3.1"),
       Cmd("git describe --tags hash_234", "3.22.4"),
     ])