Bug 1515649: [taskgraph] Inherit run-on-projects for upload-* kinds; r=dustin
authorTom Prince <mozilla@hocat.ca>
Mon, 24 Dec 2018 21:23:47 +0000
changeset 508991 90124cc372c59224ab52d9c03a1b2ebdb3ec1de4
parent 508990 82a275a5097fda9a2010262b8d8406c089c62a3a
child 508992 9cb78d2e31fb95da31304d5237fe82f80577d5d4
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1515649
milestone66.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 1515649: [taskgraph] Inherit run-on-projects for upload-* kinds; r=dustin We want these tasks to run if-and-only if the corresponding build does. Differential Revision: https://phabricator.services.mozilla.com/D15152
taskcluster/ci/upload-generated-sources/kind.yml
taskcluster/ci/upload-symbols/kind.yml
taskcluster/taskgraph/transforms/upload_generated_sources.py
taskcluster/taskgraph/transforms/upload_symbols.py
--- a/taskcluster/ci/upload-generated-sources/kind.yml
+++ b/taskcluster/ci/upload-generated-sources/kind.yml
@@ -27,12 +27,8 @@ job-template:
         docker-image: {in-tree: "lint"}
         max-run-time: 600
     run:
         using: mach
         mach: python build/upload_generated_sources.py ${ARTIFACT_URL}
         sparse-profile: upload-generated-sources
     scopes:
         - secrets:get:project/releng/gecko/build/level-{level}/gecko-generated-sources-upload
-    run-on-projects:
-        by-build-platform:
-            .*devedition.*: ['mozilla-beta', 'maple']
-            default: ['all']
--- a/taskcluster/ci/upload-symbols/kind.yml
+++ b/taskcluster/ci/upload-symbols/kind.yml
@@ -28,15 +28,8 @@ job-template:
             # {level} gets replaced in the upload_symbols transform
             SYMBOL_SECRET: "project/releng/gecko/build/level-{level}/gecko-symbol-upload"
     run:
         using: mach
         mach: python toolkit/crashreporter/tools/upload_symbols.py https://queue.taskcluster.net/v1/task/${ARTIFACT_TASKID}/artifacts/public/build/target.crashreporter-symbols-full.zip
         sparse-profile: upload-symbols
     scopes:
         - secrets:get:project/releng/gecko/build/level-{level}/gecko-symbol-upload
-    run-on-projects:
-        by-build-platform:
-            .*devedition.*: ['mozilla-beta', 'maple']
-            # 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_generated_sources.py
+++ b/taskcluster/taskgraph/transforms/upload_generated_sources.py
@@ -33,10 +33,11 @@ def add_task_info(config, jobs):
         job['treeherder']['platform'] = plat
         job['treeherder']['tier'] = dep_th['tier']
         # Add an environment variable pointing at the artifact from the build.
         artifact_url = get_artifact_url('<build>',
                                         'public/build/target.generated-files.tar.gz')
         job['worker'].setdefault('env', {})['ARTIFACT_URL'] = {
             'task-reference': artifact_url
         }
+        job['run-on-projects'] = dep_task.attributes.get('run_on_projects')
 
         yield job
--- a/taskcluster/taskgraph/transforms/upload_symbols.py
+++ b/taskcluster/taskgraph/transforms/upload_symbols.py
@@ -74,12 +74,19 @@ def fill_template(config, tasks):
 
         # Disambiguate the treeherder symbol.
         sym = 'Sym' + (th_symbol[1:] if th_symbol.startswith('B') else th_symbol)
         treeherder.setdefault(
             'symbol', join_symbol(th_groupsymbol, sym)
         )
         task['treeherder'] = treeherder
 
+        if dep.attributes.get('nightly'):
+            # For nightly builds, we want to run these tasks if the build is run.
+            task['run-on-projects'] = dep.attributes.get('run_on_projects')
+        else:
+            # For non nightly builds, these can be requested to upload to the try symbol sever.
+            task['run-on-projects'] = ['try']
+
         # clear out the stuff that's not part of a task description
         del task['primary-dependency']
 
         yield task