Bug 1274655 - Set MOZ_SOURCE_REPO in mozharness to avoid variance from shared repos; r=jlund
authorGregory Szorc <gps@mozilla.com>
Fri, 20 May 2016 12:46:27 -0700
changeset 298843 1b2ea19553caa3147d03ce6943e492e48100b588
parent 298842 32886f06e0fb2a5c2b58d49500b3baee59e970d4
child 298844 f49de097ebced4d9441a3e1ffd0aaadeb659cdea
push id30285
push usercbook@mozilla.com
push dateWed, 25 May 2016 13:06:07 +0000
treeherdermozilla-central@d6d4e8417d2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlund
bugs1274655, 1270317
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1274655 - Set MOZ_SOURCE_REPO in mozharness to avoid variance from shared repos; r=jlund Recent changes to mozharness in bug 1270317 started using pooled shared storage for Mercurial repos. This means the "default" path in Mercurial repos is variable depending on which repo was the first to be built on a machine. By default, the Firefox build system resolves the source repository from `hg paths default`. This is now incorrect default behavior in automation. We fix the regression by setting MOZ_SOURCE_REPO in the environment to path to the repository that mozharness is currently building. MozReview-Commit-ID: 34IPf7PJfuA
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -844,16 +844,23 @@ or run without that action (ie: --no-{ac
         # as we don't always want every key below added to the same dict
         env = copy.deepcopy(
             super(BuildScript, self).query_env(**kwargs)
         )
 
         # first grab the buildid
         env['MOZ_BUILD_DATE'] = self.query_buildid()
 
+        # Set the source repository to what we're building from since
+        # the default is to query `hg paths` which isn't reliable with pooled
+        # storage
+        repo_path = self._query_repo()
+        assert repo_path
+        env['MOZ_SOURCE_REPO'] = repo_path
+
         if self.query_is_nightly() or self.query_is_nightly_promotion():
             if self.query_is_nightly():
                 # nightly promotion needs to set update_channel but not do all the 'IS_NIGHTLY'
                 # automation parts like uploading symbols for now
                 env["IS_NIGHTLY"] = "yes"
             # in branch_specifics.py we might set update_channel explicitly
             if c.get('update_channel'):
                 env["MOZ_UPDATE_CHANNEL"] = c['update_channel']