Bug 1499254 - fake-multi-dep is no longer needed. r=tomprince
authorAki Sasaki <asasaki@mozilla.com>
Tue, 23 Oct 2018 19:33:09 +0000
changeset 491032 f99c22e6f6b1e8820eb20936aee362dc86dbd454
parent 491031 848914c4c934be47a40a70fc09c5c26cd8df0ec4
child 491033 b283e9a224e0450ff9880af7b7366f9e73661ac5
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewerstomprince
bugs1499254
milestone65.0a1
Bug 1499254 - fake-multi-dep is no longer needed. r=tomprince Depends on D9200 Differential Revision: https://phabricator.services.mozilla.com/D9201
taskcluster/taskgraph/loader/single_dep.py
--- a/taskcluster/taskgraph/loader/single_dep.py
+++ b/taskcluster/taskgraph/loader/single_dep.py
@@ -24,18 +24,16 @@ def loader(kind, path, config, params, l
     Optional `job-template` kind configuration value, if specified, will be used to
     pass configuration down to the specified transforms used.
     """
     only_platforms = config.get('only-for-build-platforms')
     not_platforms = config.get('not-for-build-platforms')
     only_attributes = config.get('only-for-attributes')
     job_template = config.get('job-template')
 
-    include_parents = config.get('fake-multi-dep')
-
     for task in loaded_tasks:
         if task.kind not in config.get('kind-dependencies', []):
             continue
 
         if only_platforms or not_platforms:
             build_platform = task.attributes.get('build_platform')
             build_type = task.attributes.get('build_type')
             if not build_platform or not build_type:
@@ -48,34 +46,20 @@ def loader(kind, path, config, params, l
 
         if only_attributes:
             config_attrs = set(only_attributes)
             if config_attrs - set(task.attributes):
                 # make sure all attributes exist
                 continue
 
         job = {'dependent-task': task}
-        if include_parents:
-            job['grandparent-tasks'] = _get_grandparent_tasks(task.dependencies, loaded_tasks)
 
         if job_template:
             job.update(copy.deepcopy(job_template))
 
         # copy shipping_product from upstream
         product = task.attributes.get(
             'shipping_product', task.task.get('shipping-product')
         )
         if product:
             job.setdefault('shipping-product', product)
 
         yield job
-
-
-def _get_grandparent_tasks(dependencies, loaded_tasks):
-    parent_tasks = {}
-    for task in loaded_tasks:
-        if task.label in dependencies.values():
-            for name, label in dependencies.items():
-                if label == task.label:
-                    parent_tasks[name] = task
-    if set(parent_tasks.keys()) != set(dependencies.keys()):
-        raise Exception("Missing parent tasks.")
-    return parent_tasks