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 818131 9158fb59c72769dc27fff1a09334c087a9bd3ea1
parent 818130 c9eae430459f77b1620d5150f6344aef6df12a40
child 818132 c9423cd87730524b9d9327ac24c0445f050000c1
push id116246
push userbmo:tom@mozilla.com
push dateFri, 13 Jul 2018 20:48:08 +0000
reviewersdustin
bugs1437577
milestone60.1.1
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