Bug 1382982 - Accept artifacts from autoland when performing an artifact build in automation.
MozReview-Commit-ID: cVd8GqSuAn
--- 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: