Bug 1630809 - python3 compatibility for off-cycle partner respins, typo fixes r=aki
☠☠ backed out by 8f28d9b7a86c ☠ ☠
authorNick Thomas <nthomas@mozilla.com>
Thu, 27 Aug 2020 05:27:40 +0000
changeset 546657 b3746502e227aa127a70c46a1bcd0a886bbadb0c
parent 546656 f263318ebce4bef38b8a37d8eccf661e456fea0a
child 546658 d3d841cd14f3d56b4c7498024d54b09df836d912
push id37736
push userapavel@mozilla.com
push dateFri, 28 Aug 2020 15:31:26 +0000
treeherdermozilla-central@56166cae2e26 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaki
bugs1630809
milestone82.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 1630809 - python3 compatibility for off-cycle partner respins, typo fixes r=aki Differential Revision: https://phabricator.services.mozilla.com/D87723
taskcluster/taskgraph/util/partners.py
--- a/taskcluster/taskgraph/util/partners.py
+++ b/taskcluster/taskgraph/util/partners.py
@@ -190,18 +190,18 @@ def get_repo_params(repo):
         return repo.rsplit('/', 2)[-2:]
     elif repo.startswith('git@'):
         # eg git@github.com:mozilla-partners/mailru.git
         repo = repo.replace('.git', '')
         return repo.split(':')[-1].split('/')
 
 
 def get_partners(manifestRepo, token):
-    """ Given the url to a manifest repository, retieve the default.xml and parse it into a
-    list of parter repos.
+    """ Given the url to a manifest repository, retrieve the default.xml and parse it into a
+    list of partner repos.
     """
     log.debug("Querying for manifest in %s", manifestRepo)
     owner, repo = get_repo_params(manifestRepo)
     query = MANIFEST_QUERY % {'owner': owner, 'repo': repo}
     raw_manifest = query_api(query, token)
     log.debug("Raw manifest: %s", raw_manifest)
     if not raw_manifest['data']['repository']:
         raise RuntimeError(
@@ -330,19 +330,18 @@ def get_partner_config_by_kind(config, k
         if kind.startswith(k):
             kind_config = partner_configs[k]
             break
     else:
         return {}
     # if we're only interested in a subset of partners we remove the rest
     if partner_subset:
         # TODO - should be fatal to have an unknown partner in partner_subset
-        for partner in kind_config.keys():
-            if partner not in partner_subset:
-                del(kind_config[partner])
+        for partner in [p for p in kind_config.keys() if p not in partner_subset]:
+            del(kind_config[partner])
 
     return kind_config
 
 
 def _fix_subpartner_locales(orig_config, all_locales):
     subpartner_config = deepcopy(orig_config)
     # Get an ordered list of subpartner locales that is a subset of all_locales
     subpartner_config['locales'] = sorted(list(