Bug 1551738: [release] Get channel for update-verify task from config task; r=Callek
authorTom Prince <mozilla@hocat.ca>
Wed, 15 May 2019 18:03:46 +0000
changeset 532802 a17faa0e5bf8f1680c750e81a5424715a7825387
parent 532801 edb8694f6ab184ebe26eae9d999e99b8120225d6
child 532803 4275e29bc6a60262209a287acb7f9d6d3b6bc4a0
push id11272
push userapavel@mozilla.com
push dateThu, 16 May 2019 15:28:22 +0000
treeherdermozilla-beta@2265bfc5920d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs1551738
milestone68.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 1551738: [release] Get channel for update-verify task from config task; r=Callek Differential Revision: https://phabricator.services.mozilla.com/D31161
taskcluster/ci/release-update-verify/kind.yml
taskcluster/taskgraph/transforms/update_verify.py
--- a/taskcluster/ci/release-update-verify/kind.yml
+++ b/taskcluster/ci/release-update-verify/kind.yml
@@ -33,208 +33,136 @@ job-defaults:
             - 255
     extra:
         chunks: 16
 
 jobs:
     firefox-linux64:
         description: linux64 update verify
         shipping-product: firefox
-        worker:
-            env:
-                CHANNEL:
-                    by-release-type:
-                        beta: "beta-localtest"
-                        release(-rc)?: "release-localtest"
-                        esr60: "esr-localtest"
-                        nightly: "nightly"
-                        default: "default"
         treeherder:
             symbol: UV(UV)
             platform: linux64/opt
             kind: test
             tier: 1
         attributes:
             build_platform: linux64-shippable
 
     firefox-linux:
         description: linux update verify
         shipping-product: firefox
-        worker:
-            env:
-                CHANNEL:
-                    by-release-type:
-                        beta: "beta-localtest"
-                        release(-rc)?: "release-localtest"
-                        esr60: "esr-localtest"
-                        nightly: "nightly"
-                        default: "default"
         treeherder:
             symbol: UV(UV)
             platform: linux32/opt
             kind: test
             tier: 1
         attributes:
             build_platform: linux-shippable
 
     firefox-win64:
         description: win64 update verify
         shipping-product: firefox
-        worker:
-            env:
-                CHANNEL:
-                    by-release-type:
-                        beta: "beta-localtest"
-                        release(-rc)?: "release-localtest"
-                        esr60: "esr-localtest"
-                        nightly: "nightly"
-                        default: "default"
         treeherder:
             symbol: UV(UV)
             platform: windows2012-64/opt
             kind: test
             tier: 1
         attributes:
             build_platform: win64-shippable
 
     firefox-win64-aarch64:
         description: win64-aarch64 update verify
         shipping-product: firefox
-        worker:
-            env:
-                CHANNEL:
-                    by-release-type:
-                        beta: "beta-localtest"
-                        release(-rc)?: "release-localtest"
-                        esr60: "esr-localtest"
-                        nightly: "nightly"
-                        default: "default"
         treeherder:
             symbol: UV(UV)
             platform: windows2012-aarch64/opt
             kind: test
             tier: 1
         attributes:
             build_platform: win64-aarch64-shippable
 
     firefox-win32:
         description: win32 update verify
         shipping-product: firefox
-        worker:
-            env:
-                CHANNEL:
-                    by-release-type:
-                        beta: "beta-localtest"
-                        release(-rc)?: "release-localtest"
-                        esr60: "esr-localtest"
-                        nightly: "nightly"
-                        default: "default"
         treeherder:
             symbol: UV(UV)
             platform: windows2012-32/opt
             kind: test
             tier: 1
         attributes:
             build_platform: win32-shippable
 
     firefox-macosx64:
         description: macosx64 update verify
         shipping-product: firefox
-        worker:
-            env:
-                CHANNEL:
-                    by-release-type:
-                        beta: "beta-localtest"
-                        release(-rc)?: "release-localtest"
-                        esr60: "esr-localtest"
-                        nightly: "nightly"
-                        default: "default"
         treeherder:
             symbol: UV(UV)
             platform: osx-cross/opt
             kind: test
             tier: 1
         attributes:
             build_platform: macosx64-shippable
 
     devedition-linux64:
         description: linux64 update verify
         shipping-product: devedition
-        worker:
-            env:
-                CHANNEL: "aurora-localtest"
         treeherder:
             symbol: UV(UV)
             platform: linux64-devedition/opt
             kind: test
             tier: 1
         attributes:
             build_platform: linux64-devedition-nightly
 
     devedition-linux:
         description: linux update verify
         shipping-product: devedition
-        worker:
-            env:
-                CHANNEL: "aurora-localtest"
         treeherder:
             symbol: UV(UV)
             platform: linux32-devedition/opt
             kind: test
             tier: 1
         attributes:
             build_platform: linux-devedition-nightly
 
     devedition-win64:
         description: win64 update verify
         shipping-product: devedition
-        worker:
-            env:
-                CHANNEL: "aurora-localtest"
         treeherder:
             symbol: UV(UV)
             platform: windows2012-64-devedition/opt
             kind: test
             tier: 1
         attributes:
             build_platform: win64-devedition-nightly
 
     devedition-win64-aarch64:
         description: win64-aarch64 update verify
         shipping-product: devedition
-        worker:
-            env:
-                CHANNEL: "aurora-localtest"
         treeherder:
             symbol: UV(UV)
             platform: windows2012-aarch64-devedition/opt
             kind: test
             tier: 1
         attributes:
             build_platform: win64-aarch64-devedition-nightly
 
     devedition-win32:
         description: win32 update verify
         shipping-product: devedition
-        worker:
-            env:
-                CHANNEL: "aurora-localtest"
         treeherder:
             symbol: UV(UV)
             platform: windows2012-32-devedition/opt
             kind: test
             tier: 1
         attributes:
             build_platform: win32-devedition-nightly
 
     devedition-macosx64:
         description: macosx64 update verify
         shipping-product: devedition
-        worker:
-            env:
-                CHANNEL: "aurora-localtest"
         treeherder:
             symbol: UV(UV)
             platform: osx-cross-devedition/opt
             kind: test
             tier: 1
         attributes:
             build_platform: macosx64-devedition-nightly
--- a/taskcluster/taskgraph/transforms/update_verify.py
+++ b/taskcluster/taskgraph/transforms/update_verify.py
@@ -5,26 +5,37 @@
 Transform the beetmover task into an actual task description.
 """
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 from copy import deepcopy
 
 from taskgraph.transforms.base import TransformSequence
-from taskgraph.util.schema import resolve_keyed_by
 from taskgraph.util.treeherder import add_suffix
 
 transforms = TransformSequence()
 
 
 @transforms.add
 def add_command(config, tasks):
+    config_tasks = {}
+    for dep in config.kind_dependencies_tasks:
+        if 'update-verify-config' in dep.kind:
+            config_tasks[dep.name] = dep
+
     for task in tasks:
+        config_task = config_tasks[task['name']]
         total_chunks = task["extra"]["chunks"]
+        task['worker'].setdefault('env', {}).update(
+            CHANNEL=config_task.task['extra']['channel'],
+        )
+        task.setdefault('fetches', {})[config_task.label] = [
+            "update-verify.cfg",
+        ]
 
         for this_chunk in range(1, total_chunks+1):
             chunked = deepcopy(task)
             chunked["treeherder"]["symbol"] = add_suffix(
                 chunked["treeherder"]["symbol"], this_chunk)
             chunked["label"] = "release-update-verify-{}-{}/{}".format(
                 chunked["name"], this_chunk, total_chunks
             )
@@ -35,28 +46,10 @@ def add_command(config, tasks):
                 'command': 'cd /builds/worker/checkouts/gecko && '
                            'tools/update-verify/scripts/chunked-verify.sh '
                            '{} {}'.format(
                                total_chunks,
                                this_chunk,
                            ),
                 'sparse-profile': 'update-verify',
             }
-            for thing in ("CHANNEL", "VERIFY_CONFIG"):
-                thing = "worker.env.{}".format(thing)
-                resolve_keyed_by(
-                    chunked, thing, thing,
-                    **{
-                        'project': config.params['project'],
-                        'release-type': config.params['release_type'],
-                    }
-                )
-
-            for upstream in chunked.get("dependencies", {}).keys():
-                if 'update-verify-config' in upstream:
-                    chunked.setdefault('fetches', {})[upstream] = [
-                        "update-verify.cfg",
-                    ]
-                    break
-            else:
-                raise Exception("Couldn't find upate verify config")
 
             yield chunked