Bug 1424138: Stop sending pulse message to treeherder staging routes; r?dustin,emorley draft
authorTom Prince <mozilla@hocat.ca>
Thu, 07 Dec 2017 21:19:00 -0700
changeset 709458 398519fb5453c205b2216cefccb26be654ab4d04
parent 709416 457b0fe91e0d49a5bc35014fb6f86729cd5bac9b
child 743426 9976b97b06c441ea1bf91025c9a9e8072d702a7d
push id92650
push userbmo:mozilla@hocat.ca
push dateFri, 08 Dec 2017 04:19:48 +0000
reviewersdustin, emorley
bugs1424138
milestone59.0a1
Bug 1424138: Stop sending pulse message to treeherder staging routes; r?dustin,emorley MozReview-Commit-ID: 1F3ekltLgY0
.taskcluster.yml
taskcluster/taskgraph/transforms/task.py
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -53,22 +53,20 @@ tasks:
 
       routes:
         $if: 'tasks_for == "hg-push"'
         then:
           - "index.gecko.v2.${repository.project}.latest.firefox.decision"
           - "index.gecko.v2.${repository.project}.revision.${push.revision}.firefox.decision"
           - "index.gecko.v2.${repository.project}.pushlog-id.${push.pushlog_id}.decision"
           - "tc-treeherder.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
-          - "tc-treeherder-stage.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
           - "notify.email.${ownerEmail}.on-failed"
           - "notify.email.${ownerEmail}.on-exception"
         else:
           - "tc-treeherder.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
-          - "tc-treeherder-stage.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
           - $if: 'tasks_for == "action"'
             then: "index.gecko.v2.${repository.project}.pushlog-id.${push.pushlog_id}.actions.${ownTaskId}"
             else: "index.gecko.v2.${repository.project}.latest.firefox.decision-${cron.job_name}"
 
       scopes:
         $if: 'tasks_for == "hg-push"'
         then:
           - 'assume:repo:${repoUrl[8:]}:*'
old mode 100755
new mode 100644
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -116,19 +116,16 @@ task_description_schema = Schema({
 
         # tier for this task
         'tier': int,
 
         # task platform, in the form platform/collection, used to set
         # treeherder.machine.platform and treeherder.collection or
         # treeherder.labels
         'platform': basestring,
-
-        # treeherder environments (defaults to both staging and production)
-        Required('environments', default=['production', 'staging']): ['production', 'staging'],
     },
 
     # information for indexing this build so its artifacts can be discovered;
     # if omitted, the build will not be indexed.
     Optional('index'): {
         # the name of the product this build produces
         'product': Any(
             'firefox',
@@ -592,21 +589,18 @@ V2_NIGHTLY_L10N_TEMPLATES = [
 ]
 
 V2_L10N_TEMPLATES = [
     "index.gecko.v2.{project}.revision.{head_rev}.{product}-l10n.{job-name}.{locale}",
     "index.gecko.v2.{project}.pushdate.{build_date_long}.{product}-l10n.{job-name}.{locale}",
     "index.gecko.v2.{project}.latest.{product}-l10n.{job-name}.{locale}",
 ]
 
-# the roots of the treeherder routes, keyed by treeherder environment
-TREEHERDER_ROUTE_ROOTS = {
-    'production': 'tc-treeherder',
-    'staging': 'tc-treeherder-stage',
-}
+# the roots of the treeherder routes
+TREEHERDER_ROUTE_ROOT = 'tc-treeherder'
 
 # Which repository repository revision to use when reporting results to treeherder.
 DEFAULT_BRANCH_REV_PARAM = 'head_rev'
 BRANCH_REV_PARAM = {
     'comm-esr45': 'comm_head_rev',
     'comm-esr52': 'comm_head_rev',
     'comm-beta': 'comm_head_rev',
     'comm-central': 'comm_head_rev',
@@ -1029,17 +1023,16 @@ def build_macosx_engine_payload(config, 
 
     if task.get('needs-sccache'):
         raise Exception('needs-sccache not supported in native-engine')
 
 
 @payload_builder('buildbot-bridge')
 def build_buildbot_bridge_payload(config, task, task_def):
     task['extra'].pop('treeherder', None)
-    task['extra'].pop('treeherderEnv', None)
     worker = task['worker']
 
     if worker['properties'].get('tuxedo_server_url'):
         resolve_keyed_by(
             worker, 'properties.tuxedo_server_url', worker['buildername'],
             **config.params
         )
 
@@ -1277,18 +1270,16 @@ def build_task(config, tasks):
         routes = task.get('routes', [])
         scopes = [s.format(level=level) for s in task.get('scopes', [])]
 
         # set up extra
         extra = task.get('extra', {})
         extra['parent'] = os.environ.get('TASK_ID', '')
         task_th = task.get('treeherder')
         if task_th:
-            extra['treeherderEnv'] = task_th['environments']
-
             treeherder = extra.setdefault('treeherder', {})
 
             machine_platform, collection = task_th['platform'].split('/', 1)
             treeherder['machine'] = {'platform': machine_platform}
             treeherder['collection'] = {collection: True}
 
             group_names = config.graph_config['treeherder']['group-names']
             groupSymbol, symbol = split_symbol(task_th['symbol'])
@@ -1307,23 +1298,22 @@ def build_task(config, tasks):
             treeherder['jobKind'] = task_th['kind']
             treeherder['tier'] = task_th['tier']
 
             treeherder_rev = config.params[
                 BRANCH_REV_PARAM.get(
                     config.params['project'],
                     DEFAULT_BRANCH_REV_PARAM)]
 
-            routes.extend([
-                '{}.v2.{}.{}.{}'.format(TREEHERDER_ROUTE_ROOTS[env],
+            routes.append(
+                '{}.v2.{}.{}.{}'.format(TREEHERDER_ROUTE_ROOT,
                                         config.params['project'],
                                         treeherder_rev,
                                         config.params['pushlog_id'])
-                for env in task_th['environments']
-            ])
+            )
 
         if 'expires-after' not in task:
             task['expires-after'] = '28 days' if config.params['project'] == 'try' else '1 year'
 
         if 'deadline-after' not in task:
             task['deadline-after'] = '1 day'
 
         if 'coalesce' in task: