Bug 1383880: adjust mach artifact toolchain --from-build; r=glandium
☠☠ backed out by d88e5dec2638 ☠ ☠
authorDustin J. Mitchell <dustin@mozilla.com>
Tue, 19 Sep 2017 12:55:37 +0000
changeset 431655 8cceb6a82bfb079e93005d120f540f0877a0eaf3
parent 431654 571a6c9054a540e0bf40baf837da9175f21796b9
child 431656 fd3615e7e0a3a85ba58616396468229bce30f957
push id7785
push userryanvm@gmail.com
push dateThu, 21 Sep 2017 13:39:55 +0000
treeherdermozilla-beta@06d4034a8a03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1383880
milestone57.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 1383880: adjust mach artifact toolchain --from-build; r=glandium MozReview-Commit-ID: AhGS54jB8Wl
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1779,17 +1779,16 @@ class PackageFrontend(MachCommandBase):
             unpack_file,
         )
         from requests.adapters import HTTPAdapter
         import redo
         import requests
         import shutil
 
         from taskgraph.generator import Kind
-        from taskgraph.optimize import optimize_task
         from taskgraph.util.taskcluster import (
             get_artifact_url,
             list_artifacts,
         )
         import yaml
 
         self._set_log_level(verbose)
         # Normally, we'd use self.log_manager.enable_unstructured(),
@@ -1878,16 +1877,17 @@ class PackageFrontend(MachCommandBase):
                                         record.digest)
                 records[record.filename] = DownloadRecord(
                     url, record.filename, record.size, record.digest,
                     record.algorithm, unpack=record.unpack,
                     version=record.version, visibility=record.visibility,
                     setup=record.setup)
 
         if from_build:
+            from taskgraph.optimize import IndexSearch
             params = {
                 'message': '',
                 'project': '',
                 'level': os.environ.get('MOZ_SCM_LEVEL', '3'),
                 'base_repository': '',
                 'head_repository': '',
                 'head_rev': '',
                 'moz_build_date': '',
@@ -1923,17 +1923,18 @@ class PackageFrontend(MachCommandBase):
                     b = 'toolchain-{}'.format(b)
 
                 task = toolchains.get(aliases.get(b, b))
                 if not task:
                     self.log(logging.ERROR, 'artifact', {'build': user_value},
                              'Could not find a toolchain build named `{build}`')
                     return 1
 
-                task_id = optimize_task(task, {})
+                task_id = IndexSearch().should_replace_task(
+                    task, {}, task.optimization.get('index-search', []))
                 artifact_name = task.attributes.get('toolchain-artifact')
                 if task_id in (True, False) or not artifact_name:
                     self.log(logging.ERROR, 'artifact', {'build': user_value},
                              'Could not find artifacts for a toolchain build '
                              'named `{build}`')
                     return 1
 
                 record = ArtifactRecord(task_id, artifact_name)