Bug 1314008 - Display chunking information for l10n tasks. r=dustin
authorJustin Wood <Callek@gmail.com>
Mon, 31 Oct 2016 08:04:18 -0400
changeset 433019 bbc7608106c076d45d21eb11624c9470e6fa8801
parent 433018 fc693ad74076991095ce68ccf469dd7bf5ffa4fe
child 433020 a80373508881bfbff67a2a49297c328ff8052572
push id34458
push userCallek@gmail.com
push dateThu, 03 Nov 2016 01:28:19 +0000
reviewersdustin
bugs1314008
milestone52.0a1
Bug 1314008 - Display chunking information for l10n tasks. r=dustin MozReview-Commit-ID: 17wccMNThz7
taskcluster/taskgraph/transforms/l10n.py
taskcluster/taskgraph/transforms/nightly_l10n_signing.py
--- a/taskcluster/taskgraph/transforms/l10n.py
+++ b/taskcluster/taskgraph/transforms/l10n.py
@@ -6,16 +6,17 @@ Do transforms specific to l10n kind
 """
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 import copy
 
 from mozbuild.chunkify import chunkify
 from taskgraph.transforms.base import TransformSequence
+from taskgraph.util.treeherder import split_symbol, join_symbol
 
 transforms = TransformSequence()
 
 
 def _parse_locales_file(locales_file, platform=None):
     """ Parse the passed locales file for a list of locales.
         If platform is unset matches all platforms.
     """
@@ -75,16 +76,21 @@ def chunk_locales(config, jobs):
                 chunked['run']['options'] = chunked['run'].get('options', [])
                 my_locales = []
                 my_locales = chunkify(all_locales, this_chunk, chunks)
                 chunked['run']['options'].extend([
                     "locale={}".format(locale) for locale in my_locales
                     ])
                 chunked['attributes']['l10n_chunk'] = str(this_chunk)
                 chunked['attributes']['chunk_locales'] = my_locales
+
+                # add the chunk number to the TH symbol
+                group, symbol = split_symbol(chunked['treeherder-symbol'])
+                symbol += str(this_chunk)
+                chunked['treeherder-symbol'] = join_symbol(group, symbol)
                 yield chunked
         else:
             job['run']['options'] = job['run'].get('options', [])
             job['run']['options'].extend([
                 "locale={}".format(locale) for locale in all_locales
                 ])
             yield job
 
--- a/taskcluster/taskgraph/transforms/nightly_l10n_signing.py
+++ b/taskcluster/taskgraph/transforms/nightly_l10n_signing.py
@@ -3,16 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 """
 Transform the signing task into an actual task description.
 """
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 from taskgraph.transforms.base import TransformSequence
+from taskgraph.util.treeherder import join_symbol
 
 ARTIFACT_URL = 'https://queue.taskcluster.net/v1/task/<{}>/artifacts/public/build/{}'
 
 transforms = TransformSequence()
 
 
 @transforms.add
 def add_signing_artifacts(config, jobs):
@@ -43,14 +44,16 @@ def make_signing_description(config, job
     for job in jobs:
         dep_job = job['dependent-task']
 
         job['label'] = dep_job.label.replace("nightly-l10n-", "signing-l10n-")
 
         job['depname'] = 'unsigned-repack'
         job['signing-format'] = "gpg" if "linux" in dep_job.label else "jar"
 
+        # add the chunk number to the TH symbol
+        symbol = 'Ns{}'.format(dep_job.attributes.get('l10n_chunk'))
+        group = 'tc-L10n'
+
         job['treeherder'] = {
-            # Format symbol appropriate for l10n chunking
-            'symbol': 'tc-L10n(Ns{})'.format(
-                dep_job.attributes.get('l10n_chunk')),
+            'symbol': join_symbol(group, symbol),
         }
         yield job