No bug: [partner-repack] Remove some dead code; r=nthomas
authorTom Prince <mozilla@hocat.ca>
Thu, 30 Jan 2020 10:24:13 +0000
changeset 512118 b1105fc269d77c96f3bc3b4da81510d8c49b143a
parent 512117 aed68d2d967db45a05cba610f7783f773864264d
child 512119 9dc9deb3ba3bdfb7875b8259308d31ec46f4d6d1
push id37072
push usercsabou@mozilla.com
push dateThu, 30 Jan 2020 15:44:43 +0000
treeherdermozilla-central@f97c48da9cee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnthomas
milestone74.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
No bug: [partner-repack] Remove some dead code; r=nthomas There was some code to avoid chunking a given partner repack more than once. However, that code was buggy and didn't have any affect, so delete it. Differential Revision: https://phabricator.services.mozilla.com/D61213
taskcluster/taskgraph/transforms/chunk_partners.py
--- a/taskcluster/taskgraph/transforms/chunk_partners.py
+++ b/taskcluster/taskgraph/transforms/chunk_partners.py
@@ -16,26 +16,16 @@ from taskgraph.util.partners import (
     locales_per_build_platform,
     apply_partner_priority,
 )
 
 transforms = TransformSequence()
 transforms.add(apply_partner_priority)
 
 
-used_repack_ids_by_platform = {}
-
-
-def _check_repack_ids_by_platform(platform, repack_id):
-    """avoid dup chunks, since mac signing and repackages both chunk"""
-    if used_repack_ids_by_platform.get(platform, {}).get(repack_id):
-        return True
-    used_repack_ids_by_platform.setdefault(platform, {})['repack_id'] = True
-
-
 def _get_repack_ids_by_platform(partner_configs, build_platform):
     combinations = []
     for partner, partner_config in partner_configs.items():
         for sub_partner, cfg in partner_config.items():
             if build_platform not in cfg.get("platforms", []):
                 continue
             locales = locales_per_build_platform(build_platform, cfg.get('locales', []))
             for locale in locales:
@@ -67,29 +57,23 @@ def chunk_partners(config, jobs):
                     chunk = chunkify(platform_repack_ids, this_chunk, chunks)
                     partner_job = copy.deepcopy(job)
                     partner_job.setdefault('extra', {}).setdefault('repack_ids', chunk)
                     partner_job['extra']['repack_suffix'] = str(this_chunk)
                     yield partner_job
             # linux and windows we fan out immediately to one task per partner-sub_partner-locale
             else:
                 for repack_id in platform_repack_ids:
-                    if _check_repack_ids_by_platform(build_platform, repack_id):
-                        continue
                     partner_job = copy.deepcopy(job)  # don't overwrite dict values here
                     partner_job.setdefault('extra', {})
                     partner_job['extra']['repack_id'] = repack_id
                     yield partner_job
         # fan out chunked mac signing for repackage
         elif repack_ids:
             for repack_id in repack_ids:
-                if _check_repack_ids_by_platform(build_platform, repack_id):
-                    continue
                 partner_job = copy.deepcopy(job)
                 partner_job.setdefault('extra', {}).setdefault('repack_id', repack_id)
                 yield partner_job
         # otherwise we've fully fanned out already, continue by passing repack_id on
         else:
-            if _check_repack_ids_by_platform(build_platform, repack_id):
-                continue
             partner_job = copy.deepcopy(job)
             partner_job.setdefault('extra', {}).setdefault('repack_id', repack_id)
             yield partner_job