Bug 1286092 - Actually enable l10n repacks based on the same push on-change. r=aki
authorJustin Wood <Callek@gmail.com>
Wed, 23 May 2018 14:57:23 -0400
changeset 474743 698fca98c32eef7d5dd5bd7b588a859d8c51a0cf
parent 474742 8a9c609fa789377511574c2bd3a075335c63543e
child 474744 37d0408ce6e3671ca9b2998109bae2eff37deca9
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaki
bugs1286092
milestone62.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 1286092 - Actually enable l10n repacks based on the same push on-change. r=aki for L10n jobs should run per-push based on the corresponding builds Differential Revision: https://phabricator.services.mozilla.com/D1409
taskcluster/ci/l10n/kind.yml
taskcluster/taskgraph/transforms/l10n.py
testing/mozharness/configs/single_locale/onchange.py
testing/mozharness/configs/single_locale/try.py
--- a/taskcluster/ci/l10n/kind.yml
+++ b/taskcluster/ci/l10n/kind.yml
@@ -14,111 +14,173 @@ transforms:
 kind-dependencies:
    - build
    - toolchain
 
 only-for-build-platforms:
    - linux64/opt
    - linux/opt
    - android-api-16/opt
-   # - macosx64/opt
+   - macosx64/opt
+   - win32/opt
+   - win64/opt
 
 job-template:
    description:
       by-build-platform:
          default: Localization
-         android-api-16-l10n: Single Locale Repack
+         android-api-16: Single Locale Repack
    locales-file:
       by-build-platform:
-         default: browser/locales/l10n-changesets.json
-         android-api-16-l10n: mobile/locales/l10n-changesets.json
+         default: browser/locales/l10n-onchange-changesets.json
+         android-api-16: mobile/locales/l10n-onchange-changesets.json
    ignore-locales:
       by-build-platform:
          # OSX has a special locale for japanese
          macosx64.*: [ja]
          default: [ja-JP-mac]
    run-time:
       by-build-platform:
          default: 36000
-         android-api-16-l10n: 18000
+         android-api-16: 18000
    docker-image:
       by-build-platform:
-         android-api-16-l10n:
+         android-api-16:
             in-tree: android-build
          default: null
    secrets:
       by-build-platform:
          default: false
-         android-api-16-l10n: true
+         android-api-16: true
    toolchains:
       by-build-platform:
          default: []
          macosx64:
             - linux64-libdmg
             - linux64-hfsplus
-         android-api-16-l10n:
+         android-api-16:
             - android-gradle-dependencies
             - android-sdk-linux
    tooltool:
       by-build-platform:
-         default: public
-         android-api-16-l10n: internal
-         macosx64-nightly: internal
+         default: internal
+         linux.*: public
+   index:
+      type: l10n
+      product:
+         by-build-platform:
+            default: firefox
+            android-api-16: mobile
+      job-name:
+         by-build-platform:
+            linux: linux-opt
+            linux64: linux64-opt
+            macosx64: macosx64-opt
+            win32: win32-opt
+            win64: win64-opt
+            android-api-16: android-api-16-opt
+   run-on-projects: ['all']
    worker-type:
       by-build-platform:
          default: aws-provisioner-v1/gecko-{level}-b-linux
-         android: aws-provisioner-v1/gecko-{level}-b-android
+         android-api-16: aws-provisioner-v1/gecko-{level}-b-android
+         win.*: aws-provisioner-v1/gecko-{level}-b-win2012
    treeherder:
       symbol: L10n
       tier: 3
       platform:
          by-build-platform:
-            linux64-l10n: linux64/opt
-            linux-l10n: linux32/opt
+            linux64: linux64/opt
+            linux: linux32/opt
             macosx64: osx-cross/opt
-            android-api-16-l10n: android-4-0-armv7-api16/opt
+            win32: windows2012-32/opt
+            win64: windows2012-64/opt
+            android-api-16: android-4-0-armv7-api16/opt
+   env:
+      by-build-platform:
+         linux.*:   # linux64 and 32 get same treatment here
+            EN_US_PACKAGE_NAME: target.tar.bz2
+            EN_US_BINARY_URL:
+               task-reference: https://queue.taskcluster.net/v1/task/<signed-build>/artifacts/{artifact_prefix}
+            MAR_TOOLS_URL:
+               task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/{artifact_prefix}/host/bin
+         macosx64:
+            EN_US_PACKAGE_NAME: target.dmg
+            EN_US_BINARY_URL:
+               task-reference: https://queue.taskcluster.net/v1/task/<repackage>/artifacts/{artifact_prefix}
+            MAR_TOOLS_URL:
+               task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/{artifact_prefix}/host/bin
+         win.*:
+            EN_US_PACKAGE_NAME: target.zip
+            EN_US_BINARY_URL:
+               task-reference: https://queue.taskcluster.net/v1/task/<signed-build>/artifacts/{artifact_prefix}
+            EN_US_INSTALLER_BINARY_URL:
+               task-reference: https://queue.taskcluster.net/v1/task/<repackage-signed>/artifacts/{artifact_prefix}
+            MAR_TOOLS_URL:
+               task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/{artifact_prefix}/host/bin
+         android-api-16:
+            EN_US_PACKAGE_NAME: target.apk
+            EN_US_BINARY_URL:
+               task-reference: https://queue.taskcluster.net/v1/task/<unsigned-build>/artifacts/{artifact_prefix}
    mozharness:
       config:
          by-build-platform:
-            linux-l10n:
+            linux:
                - single_locale/{project}.py
                - single_locale/linux32.py
                - single_locale/tc_common.py
                - single_locale/tc_linux32.py
-            linux64-l10n:
+               - single_locale/onchange.py
+            linux64:
                - single_locale/{project}.py
                - single_locale/linux64.py
                - single_locale/tc_common.py
                - single_locale/tc_linux64.py
+               - single_locale/onchange.py
             macosx64:
                - single_locale/{project}.py
                - single_locale/macosx64.py
                - single_locale/tc_common.py
                - single_locale/tc_macosx64.py
-            android-api-16-l10n:
+               - single_locale/onchange.py
+            win32:
+               - single_locale/{project}.py
+               - single_locale/win32.py
+               - single_locale/tc_common.py
+               - single_locale/tc_win32.py
+               - single_locale/onchange.py
+            win64:
+               - single_locale/{project}.py
+               - single_locale/win64.py
+               - single_locale/tc_common.py
+               - single_locale/tc_win64.py
+               - single_locale/onchange.py
+            android-api-16:
                - single_locale/{project}_android-api-16.py
                - single_locale/tc_common.py
                - single_locale/tc_android-api-16.py
+               - single_locale/onchange.py
       # no default, so we fail on new entries
       options:
          - revision=$GECKO_HEAD_REV
          - total-chunks=1
          - this-chunk=1
       actions:
          by-build-platform:
-            default: [clone-locales list-locales setup repack summary]
-            android-api-16-l10n: [get-secrets
-                                  clone-locales list-locales setup repack
-                                  upload-repacks summary]
+            default: ['clone-locales', 'list-locales', 'setup', 'repack',
+                      'summary']
+            android-api-16: ['get-secrets',
+                             'clone-locales', 'list-locales', 'setup', 'repack',
+                             'upload-repacks', 'summary']
       script:
          by-build-platform:
             default: mozharness/scripts/desktop_l10n.py
-            android-api-16-l10n: mozharness/scripts/mobile_l10n.py
+            android-api-16: mozharness/scripts/mobile_l10n.py
    when:
       files-changed:
-         - browser/locales/l10n-changesets.json
-         - mobile/locales/l10n-changesets.json
+         - browser/locales/l10n-onchange-changesets.json
+         - mobile/locales/l10n-onchange-changesets.json
          - testing/mozharness/configs/single_locale/**
          - testing/mozharness/mozharness/mozilla/l10n/locales.py
          - testing/mozharness/scripts/desktop_l10n.py
          - third_party/python/compare-locales/**
          - toolkit/locales/**
          - toolkit/mozapps/installer/**
--- a/taskcluster/taskgraph/transforms/l10n.py
+++ b/taskcluster/taskgraph/transforms/l10n.py
@@ -193,64 +193,47 @@ def _remove_locales(locales, to_remove=N
         locale: revision for locale, revision in locales.items() if locale not in to_remove
     }
 
 
 @transforms.add
 def setup_name(config, jobs):
     for job in jobs:
         dep = job['dependent-task']
-        if dep.attributes.get('nightly'):
-            # Set the name to the same as the dep task, without kind name.
-            # Label will get set automatically with this kinds name.
-            job['name'] = job.get('name',
-                                  dep.task['metadata']['name'][
-                                    len(dep.kind) + 1:])
-        else:
-            # Set to match legacy use at the moment (to support documented try
-            # syntax). Set the name to same as dep task + '-l10n' but without the
-            # kind name attached, since that gets added when label is generated
-            name, jobtype = dep.task['metadata']['name'][len(dep.kind) + 1:].split('/')
-            job['name'] = "{}-l10n/{}".format(name, jobtype)
+        # Set the name to the same as the dep task, without kind name.
+        # Label will get set automatically with this kinds name.
+        job['name'] = job.get('name',
+                              dep.task['metadata']['name'][len(dep.kind) + 1:])
         yield job
 
 
 @transforms.add
 def copy_in_useful_magic(config, jobs):
     for job in jobs:
         dep = job['dependent-task']
         attributes = copy_attributes_from_dependent_job(dep)
         attributes.update(job.get('attributes', {}))
         # build-platform is needed on `job` for by-build-platform
         job['build-platform'] = attributes.get("build_platform")
-        if not attributes.get("nightly"):
-            # set build_platform to have l10n as well, to match older l10n setup
-            # for now
-            job['build-platform'] = "{}-l10n".format(job['build-platform'])
-
-        attributes['build_platform'] = job['build-platform']
         job['attributes'] = attributes
         yield job
 
 
 @transforms.add
 def validate_early(config, jobs):
     for job in jobs:
         validate_schema(l10n_description_schema, job,
                         "In job {!r}:".format(job.get('name', 'unknown')))
         yield job
 
 
 @transforms.add
 def setup_nightly_dependency(config, jobs):
     """ Sets up a task dependency to the signing job this relates to """
     for job in jobs:
-        if not job['attributes'].get('nightly'):
-            yield job
-            continue  # do not add a dep unless we're a nightly
         job['dependencies'] = {'unsigned-build': job['dependent-task'].label}
         if job['attributes']['build_platform'].startswith('win') or \
                 job['attributes']['build_platform'].startswith('linux'):
             # Weave these in and just assume they will be there in the resulting graph
             job['dependencies'].update({
                 'signed-build': 'build-signing-{}'.format(job['name']),
             })
         if job['attributes']['build_platform'].startswith('macosx'):
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/single_locale/onchange.py
@@ -0,0 +1,3 @@
+config = {
+    "update_channel": "default",
+}
--- a/testing/mozharness/configs/single_locale/try.py
+++ b/testing/mozharness/configs/single_locale/try.py
@@ -1,15 +1,15 @@
 import os
 
 config = {
     "nightly_build": False,
     "branch": "try",
     "en_us_binary_url": "http://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central",
-    "update_channel": "nightly",
+    "update_channel": "nightly-try",
 
     # l10n
     "hg_l10n_base": "https://hg.mozilla.org/l10n-central",
 
     # mar
     "mar_tools_url": os.environ.get(
         "MAR_TOOLS_URL",
         # Default to fetching from ftp rather than setting an environ var