Bug 1559327 - Follow-up: Remove references to 'stub_installer' in 'remove_widevine' transform. rs=bustage-fix,jorgk
authorRob Lemley <rob@thunderbird.net>
Fri, 14 Jun 2019 10:54:24 -0400
changeset 35868 793a15b6f65edb4f04051913786b829178829e4e
parent 35867 b26f815835648f3e0e80f9568d2adb33f5c97251
child 35869 a949ea7ada533248cdf0f93b3777f7e6597706b5
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersbustage-fix, jorgk
bugs1559327
Bug 1559327 - Follow-up: Remove references to 'stub_installer' in 'remove_widevine' transform. rs=bustage-fix,jorgk Declarative artifacts happened, so we don't need to look for stub-installer in the list of signed artifacts anymore. It won't show up unless we add it to the artifact-map manifests. Function name and comment updated to reflect these changes.
taskcluster/ci/beetmover-l10n/kind.yml
taskcluster/ci/beetmover-repackage/kind.yml
taskcluster/ci/build-signing/kind.yml
taskcluster/ci/nightly-l10n-signing/kind.yml
taskcluster/ci/repackage-l10n/kind.yml
taskcluster/ci/repackage-signing-l10n/kind.yml
taskcluster/ci/repackage-signing/kind.yml
taskcluster/ci/repackage/kind.yml
taskcluster/comm_taskgraph/__init__.py
--- a/taskcluster/ci/beetmover-l10n/kind.yml
+++ b/taskcluster/ci/beetmover-l10n/kind.yml
@@ -4,17 +4,17 @@
 ---
 loader: taskgraph.loader.single_dep:loader
 
 transforms:
     - taskgraph.transforms.beetmover_l10n:transforms
     - taskgraph.transforms.name_sanity:transforms
     - taskgraph.transforms.beetmover:transforms
     - taskgraph.transforms.task:transforms
-    - comm_taskgraph:remove_widevine_and_stub_installer
+    - comm_taskgraph:remove_widevine
 
 kind-dependencies:
     - nightly-l10n-signing
 
 only-for-attributes:
     - nightly
 
 not-for-build-platforms:
--- a/taskcluster/ci/beetmover-repackage/kind.yml
+++ b/taskcluster/ci/beetmover-repackage/kind.yml
@@ -6,17 +6,17 @@ loader: taskgraph.loader.multi_dep:loade
 
 group-by: single-locale
 
 transforms:
     - taskgraph.transforms.name_sanity:transforms
     - taskgraph.transforms.beetmover_repackage_l10n:transforms
     - taskgraph.transforms.beetmover_repackage:transforms
     - taskgraph.transforms.task:transforms
-    - comm_taskgraph:remove_widevine_and_stub_installer
+    - comm_taskgraph:remove_widevine
 
 kind-dependencies:
     - build
     - build-signing
     - repackage
     - repackage-signing
     - nightly-l10n
     - nightly-l10n-signing
--- a/taskcluster/ci/build-signing/kind.yml
+++ b/taskcluster/ci/build-signing/kind.yml
@@ -4,12 +4,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_and_stub_installer
+    - comm_taskgraph:remove_widevine
 
 kind-dependencies:
     - build
--- a/taskcluster/ci/nightly-l10n-signing/kind.yml
+++ b/taskcluster/ci/nightly-l10n-signing/kind.yml
@@ -4,16 +4,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_and_stub_installer
+    - comm_taskgraph:remove_widevine
 
 kind-dependencies:
     - nightly-l10n
 
 only-for-attributes:
     - nightly
     - shippable
--- a/taskcluster/ci/repackage-l10n/kind.yml
+++ b/taskcluster/ci/repackage-l10n/kind.yml
@@ -6,17 +6,17 @@ loader: taskgraph.loader.single_dep:load
 
 transforms:
     - taskgraph.transforms.repackage_l10n:transforms
     - taskgraph.transforms.name_sanity:transforms
     - taskgraph.transforms.repackage:transforms
     - taskgraph.transforms.use_toolchains:transforms
     - taskgraph.transforms.job:transforms
     - taskgraph.transforms.task:transforms
-    - comm_taskgraph:remove_widevine_and_stub_installer
+    - comm_taskgraph:remove_widevine
 
 kind-dependencies:
     - nightly-l10n-signing
     - toolchain
 
 only-for-build-platforms:
     - linux-shippable/opt
     - linux64-shippable/opt
--- a/taskcluster/ci/repackage-signing-l10n/kind.yml
+++ b/taskcluster/ci/repackage-signing-l10n/kind.yml
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 ---
 loader: taskgraph.loader.single_dep:loader
 
 transforms:
     - taskgraph.transforms.name_sanity:transforms
     - taskgraph.transforms.repackage_signing:transforms
     - taskgraph.transforms.task:transforms
-    - comm_taskgraph:remove_widevine_and_stub_installer
+    - comm_taskgraph:remove_widevine
 
 
 kind-dependencies:
     - repackage-l10n
 
 only-for-build-platforms:
     - win32-shippable/opt
     - win64-shippable/opt
--- a/taskcluster/ci/repackage-signing/kind.yml
+++ b/taskcluster/ci/repackage-signing/kind.yml
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 ---
 loader: taskgraph.loader.single_dep:loader
 
 transforms:
     - taskgraph.transforms.name_sanity:transforms
     - taskgraph.transforms.repackage_signing:transforms
     - taskgraph.transforms.task:transforms
-    - comm_taskgraph:remove_widevine_and_stub_installer
+    - comm_taskgraph:remove_widevine
 
 
 kind-dependencies:
     - repackage
 
 only-for-build-platforms:
     - win32-shippable/opt
     - win64-shippable/opt
--- a/taskcluster/ci/repackage/kind.yml
+++ b/taskcluster/ci/repackage/kind.yml
@@ -5,17 +5,17 @@
 loader: taskgraph.loader.single_dep:loader
 
 transforms:
     - taskgraph.transforms.name_sanity:transforms
     - taskgraph.transforms.repackage:transforms
     - taskgraph.transforms.use_toolchains:transforms
     - taskgraph.transforms.job:transforms
     - taskgraph.transforms.task:transforms
-    - comm_taskgraph:remove_widevine_and_stub_installer
+    - comm_taskgraph:remove_widevine
 
 kind-dependencies:
     - build-signing
     - toolchain
 
 only-for-build-platforms:
     - linux-shippable/opt
     - linux64-shippable/opt
--- a/taskcluster/comm_taskgraph/__init__.py
+++ b/taskcluster/comm_taskgraph/__init__.py
@@ -54,49 +54,37 @@ def reference_loader(kind, path, config,
 
     if jobs is not None:
         jobs = set(jobs)
         return (job for job in inputs if (_get_aliases(kind, job) & jobs))
     else:
         return inputs
 
 
-def remove_widevine_and_stub_installer(config, jobs):
+def remove_widevine(config, jobs):
     """
-    Remove references to widevine signing and to packaging a stub installer.
+    Remove references to widevine signing.
 
-    This is an expedient hack to avoid adding special cases for handling these in
-    mozilla-central code.  This code should become unnesssary after the
-    declarative artifact[1] work is complete.
-
-    [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1466714
+    This is to avoid adding special cases for handling signed artifacts
+    in mozilla-central code. Artifact signature formats are determined in
+    taskgraph.util.signed_artifacts. There's no override mechanism so we
+    remove the autograph_widevine format here.
     """
     for job in jobs:
         task = job['task']
         payload = task['payload']
 
-        for scope in ['project:comm:thunderbird:releng:signing:format:autograph_widevine',
-                      'project:comm:thunderbird:releng:signing:format:sha2signcodestub']:
-            if scope in task['scopes']:
-                task['scopes'].remove(scope)
+        widevine_scope = 'project:comm:thunderbird:releng:signing:format' \
+                         ':autograph_widevine'
+        if widevine_scope in task['scopes']:
+            task['scopes'].remove(widevine_scope)
         if 'upstreamArtifacts' in payload:
             for artifact in payload['upstreamArtifacts']:
                 if 'autograph_widevine' in artifact.get('formats', []):
                     artifact['formats'].remove('autograph_widevine')
-                artifact['paths'] = [path for path in artifact['paths']
-                                     if not path.endswith(('/setup-stub.exe',
-                                                           '/target.stub-installer.exe',))]
-            payload['upstreamArtifacts'] = [artifact for artifact in payload['upstreamArtifacts']
-                                            if artifact.get('formats', []) != ['sha2signcodestub']]
-        if 'artifacts' in payload and isinstance(payload['artifacts'], list):
-            payload['artifacts'] = [artifact for artifact in payload['artifacts']
-                                    if not artifact['name'].endswith('/target.stub-installer.exe')]
-        if 'env' in payload:
-            if 'SIGNED_SETUP_STUB' in payload['env']:
-                del payload['env']['SIGNED_SETUP_STUB']
 
         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!)