bug 1437577 - allow uploading symbols from any build type on try. r=dustin
authorTed Mielczarek <ted@mielczarek.org>
Thu, 12 Apr 2018 08:49:43 -0400
changeset 417153 a0b66c435f62a6c3f3fd68c9e4050477a778bd86
parent 417152 01511447fa7ed82228fb8ffaa3b1850bb7429a8c
child 417154 94b228e67f4c4fd14dadc89b7e583d12d17bea2a
push id102991
push usertmielczarek@mozilla.com
push dateMon, 07 May 2018 20:31:07 +0000
treeherdermozilla-inbound@a0b66c435f62 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1437577
milestone61.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 1437577 - allow uploading symbols from any build type on try. r=dustin Previously we would only generate upload-symbols tasks for nightly builds, since we only want to upload symbols for builds we ship to users. On try, developers may want to use the symbol server but very rarely want to do nightly builds, so allow uploading symbols from any build type there. MozReview-Commit-ID: IYs9mZii3DN
taskcluster/ci/upload-symbols/kind.yml
taskcluster/taskgraph/transforms/upload_symbols.py
--- a/taskcluster/ci/upload-symbols/kind.yml
+++ b/taskcluster/ci/upload-symbols/kind.yml
@@ -7,19 +7,16 @@ loader: taskgraph.loader.single_dep:load
 transforms:
     - taskgraph.transforms.upload_symbols:transforms
     - taskgraph.transforms.job:transforms
     - taskgraph.transforms.task:transforms
 
 kind-dependencies:
     - build
 
-only-for-attributes:
-    - nightly
-
 job-template:
     description: Upload Symbols
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         docker-image: {in-tree: "lint"}
         max-run-time: 900
         env:
             ARTIFACT_TASKID: {"task-reference": "<build>"}
@@ -33,9 +30,12 @@ job-template:
         sparse-profile: upload-symbols
     optimization:
         only-if-dependencies-run: null
     scopes:
         - secrets:get:project/releng/gecko/build/level-{level}/gecko-symbol-upload
     run-on-projects:
         by-build-platform:
             .*devedition.*: ['mozilla-beta', 'maple']
-            default: ['all']
+            # Only upload symbols for nightlies on most branches.
+            .*(?<!-devedition)-nightly: ['all']
+            # Allow symbol upload for any build type on try.
+            default: ['try']
--- a/taskcluster/taskgraph/transforms/upload_symbols.py
+++ b/taskcluster/taskgraph/transforms/upload_symbols.py
@@ -28,28 +28,28 @@ def fill_template(config, tasks):
         task['worker']['env']['SYMBOL_SECRET'] = task['worker']['env']['SYMBOL_SECRET'].format(
             level=config.params['level'])
 
         build_platform = dep.attributes.get('build_platform')
         build_type = dep.attributes.get('build_type')
         attributes = task.setdefault('attributes', {})
         attributes['build_platform'] = build_platform
         attributes['build_type'] = build_type
-        if 'nightly' in build_platform:
+        if dep.attributes.get('nightly'):
             attributes['nightly'] = True
 
         treeherder = task.get('treeherder', {})
         th = dep.task.get('extra')['treeherder']
-        treeherder.setdefault('platform',
-                              "{}/{}".format(th['machine']['platform'],
-                                             build_type))
+        th_platform = dep.task['extra'].get('treeherder-platform',
+                                            "{}/{}".format(th['machine']['platform'], build_type))
+        treeherder.setdefault('platform', th_platform)
         treeherder.setdefault('tier', th['tier'])
         treeherder.setdefault('kind', th['jobKind'])
-        if dep.attributes.get('nightly'):
-            treeherder.setdefault('symbol', 'SymN')
-        else:
-            treeherder.setdefault('symbol', 'Sym')
+        # Disambiguate the treeherder symbol.
+        build_sym = th['symbol']
+        sym = 'Sym' + (build_sym[1:] if build_sym.startswith('B') else build_sym)
+        treeherder.setdefault('symbol', sym)
         task['treeherder'] = treeherder
 
         # clear out the stuff that's not part of a task description
         del task['dependent-task']
 
         yield task