Bug 1508382: [taskgraph] Verify that the specifed sparse profile exists; r=gps
☠☠ backed out by ea9af5fdb20e ☠ ☠
authorTom Prince <mozilla@hocat.ca>
Mon, 26 Nov 2018 17:41:13 +0000
changeset 504515 a9b90a979fc70966dde072d66d97bde8e69066bb
parent 504514 74bdaf9e17c01ca9ee6748ee9ddf530776800428
child 504516 5c990a7c358c28af90cd8eaa6bfaf1b8bda061e5
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1508382
milestone65.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 1508382: [taskgraph] Verify that the specifed sparse profile exists; r=gps Differential Revision: https://phabricator.services.mozilla.com/D12449
taskcluster/taskgraph/transforms/job/toolchain.py
taskcluster/taskgraph/transforms/task.py
--- a/taskcluster/taskgraph/transforms/job/toolchain.py
+++ b/taskcluster/taskgraph/transforms/job/toolchain.py
@@ -156,18 +156,18 @@ def docker_worker_toolchain(config, job,
         wrapper = ''
 
     args = run.get('arguments', '')
     if args:
         args = ' ' + shell_quote(*args)
 
     sparse_profile = []
     if run.get('sparse-profile'):
-        sparse_profile = ['--sparse-profile',
-                          'build/sparse-profiles/{}'.format(run['sparse-profile'])]
+        sparse_profile = ['--sparse-profile=build/sparse-profiles/{}'
+                          .format(run['sparse-profile'])]
 
     worker['command'] = [
         '{workdir}/bin/run-task'.format(**run),
         '--vcs-checkout={}'.format(gecko_path),
     ] + sparse_profile + [
         '--',
         'bash',
         '-c',
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -1909,16 +1909,25 @@ def check_run_task_caches(config, tasks)
             for arg in command[1:]:
                 if not isinstance(arg, basestring):
                     continue
 
                 if arg == '--':
                     break
 
                 if arg.startswith('--sparse-profile'):
+                    if '=' not in arg:
+                        raise Exception(
+                            '{} is specifying `--sparse-profile` to run-task as two arguments. '
+                            'Unable to determine if the sparse profile exists.'.format(task['label']))
+                    _, sparse_profile = arg.split('=', 1)
+                    if not os.path.exists(os.path.join(GECKO, sparse_profile)):
+                        raise Exception(
+                            '{} is using non-existant sparse profile {}.'.format(
+                                task['label'], sparse_profile))
                     require_sparse_cache = True
                     break
 
         for cache in payload.get('cache', {}):
             if re_sparse_checkout_cache.match(cache):
                 have_sparse_cache = True
 
             if not re_reserved_caches.match(cache):