Bug 1382982 - Accept artifacts from autoland when performing an artifact build in automation. draft
authorChris Manchester <cmanchester@mozilla.com>
Wed, 28 Mar 2018 11:22:34 -0700
changeset 773956 d692086dcd8fa7265397d23255e2fe3ce441d78e
parent 773944 ddf011ffcbc15959592871afb965fbe8be71ec1a
push id104357
push userbmo:cmanchester@mozilla.com
push dateWed, 28 Mar 2018 18:22:57 +0000
bugs1382982
milestone61.0a1
Bug 1382982 - Accept artifacts from autoland when performing an artifact build in automation. MozReview-Commit-ID: cVd8GqSuAn
python/mozbuild/mozbuild/artifacts.py
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -925,17 +925,26 @@ class Artifacts(object):
         ancestors or `rev`. Multiple trees are queried, as the `rev` may
         already have been pushed to multiple repositories. For each repository
         containing `rev`, the pushhead introducing `rev` and the previous
         `count` pushheads from that point are included in the output.
         """
 
         with self._pushhead_cache as pushhead_cache:
             found_pushids = {}
-            for tree in CANDIDATE_TREES:
+
+            search_trees = list(CANDIDATE_TREES)
+            # We aren't generally interested in pushes from autoland because
+            # people aren't generally working off of autoland locally, but we
+            # sometimes find errant public pushheads on autoland in automation,
+            # so we check autoland in automation as a workaround.
+            if os.environ.get('MOZ_AUTOMATION'):
+                search_trees += ['integration/autoland']
+
+            for tree in search_trees:
                 self.log(logging.INFO, 'artifact',
                          {'tree': tree,
                           'rev': rev},
                          'Attempting to find a pushhead containing {rev} on {tree}.')
                 try:
                     pushid = pushhead_cache.parent_pushhead_id(tree, rev)
                     found_pushids[tree] = pushid
                 except ValueError: