Bug 1574034 - Remove automatic langpack signing from build-signing jobs. r=darktrojan
authorRob Lemley <rob@thunderbird.net>
Wed, 14 Aug 2019 22:20:24 -0400
changeset 27326 603a94da05d0987849d8a578e90c8ef4035992ad
parent 27325 82fde34332727c5a9e1128299cba660089b72289
child 27327 daa65bc8dffd3a01ef063823cf738a4131c1b80e
push id16284
push usermozilla@jorgk.com
push dateThu, 15 Aug 2019 07:27:14 +0000
treeherdercomm-central@3fcb852ddff9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdarktrojan
bugs1574034
Bug 1574034 - Remove automatic langpack signing from build-signing jobs. r=darktrojan Look at the job description of build signing jobs (build-signing and nightly-l10n-signing) and remove target.langpack.xpi.
taskcluster/ci/build-signing/kind.yml
taskcluster/ci/nightly-l10n-signing/kind.yml
taskcluster/comm_taskgraph/__init__.py
--- a/taskcluster/ci/build-signing/kind.yml
+++ b/taskcluster/ci/build-signing/kind.yml
@@ -5,11 +5,12 @@
 loader: taskgraph.loader.build_signing:loader
 
 transforms:
     - taskgraph.transforms.name_sanity:transforms
     - taskgraph.transforms.build_signing:transforms
     - taskgraph.transforms.signing:transforms
     - taskgraph.transforms.task:transforms
     - comm_taskgraph:remove_widevine
+    - comm_taskgraph:no_sign_langpacks
 
 kind-dependencies:
     - build
--- a/taskcluster/ci/nightly-l10n-signing/kind.yml
+++ b/taskcluster/ci/nightly-l10n-signing/kind.yml
@@ -5,15 +5,16 @@
 loader: taskgraph.loader.single_dep:loader
 
 transforms:
     - taskgraph.transforms.name_sanity:transforms
     - taskgraph.transforms.nightly_l10n_signing:transforms
     - taskgraph.transforms.signing:transforms
     - taskgraph.transforms.task:transforms
     - comm_taskgraph:remove_widevine
+    - comm_taskgraph:no_sign_langpacks
 
 kind-dependencies:
     - nightly-l10n
 
 only-for-attributes:
     - nightly
     - shippable
--- a/taskcluster/comm_taskgraph/__init__.py
+++ b/taskcluster/comm_taskgraph/__init__.py
@@ -79,16 +79,38 @@ def remove_widevine(config, jobs):
         if 'upstreamArtifacts' in payload:
             for artifact in payload['upstreamArtifacts']:
                 if 'autograph_widevine' in artifact.get('formats', []):
                     artifact['formats'].remove('autograph_widevine')
 
         yield job
 
 
+def no_sign_langpacks(config, jobs):
+    """
+    Remove langpacks from signing jobs after they are automatically added.
+    """
+    for job in jobs:
+        task = job['task']
+        payload = task['payload']
+
+        if 'upstreamArtifacts' in payload:
+            for artifact in payload['upstreamArtifacts']:
+                if 'autograph_langpack' in artifact.get('formats', []):
+                    artifact['formats'].remove('autograph_langpack')
+
+                if not artifact['formats']:  # length zero list is False
+                    for remove_path in artifact['paths']:
+                        job['release-artifacts'].remove(remove_path)
+
+                    payload['upstreamArtifacts'].remove(artifact)
+
+        yield job
+
+
 def tests_drop_1proc(config, jobs):
     """
     Remove the -1proc suffix from Treeherder group symbols.
     Restore the -e10s suffix (because some day we will have them!)
 
     Reverses the effects of bug 1541527. Thunderbird builds are all single
     process.
     """