Bug 1466222 - Drop support for chunking of locale lists inside mozharness. r=catlee
☠☠ backed out by ea2226175bc8 ☠ ☠
authorJustin Wood <Callek@gmail.com>
Sat, 02 Jun 2018 08:03:23 -0400
changeset 421224 7fc1c68ceeabdc083819d5c7e84ce8e3f58efa3e
parent 421223 ed1a9704f0b20eeb390837974e3375681fd8f8f9
child 421225 40292a1aabf81ef1cf84a55bcbeddc3f40c80a33
push id34090
push userbtara@mozilla.com
push dateTue, 05 Jun 2018 09:30:51 +0000
treeherdermozilla-central@a358755643e9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscatlee
bugs1466222
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 1466222 - Drop support for chunking of locale lists inside mozharness. r=catlee for "Cleanup l10n mozharness config files." Differential Revision: https://phabricator.services.mozilla.com/D1516
taskcluster/ci/l10n/kind.yml
testing/mozharness/mozharness/base/parallel.py
testing/mozharness/mozharness/mozilla/l10n/locales.py
testing/mozharness/scripts/desktop_l10n.py
testing/mozharness/scripts/mobile_l10n.py
--- a/taskcluster/ci/l10n/kind.yml
+++ b/taskcluster/ci/l10n/kind.yml
@@ -156,18 +156,16 @@ job-template:
             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: ['get-secrets',
                              'clone-locales', 'list-locales', 'setup', 'repack',
                              'upload-repacks', 'summary']
       script:
--- a/testing/mozharness/mozharness/base/parallel.py
+++ b/testing/mozharness/mozharness/base/parallel.py
@@ -5,17 +5,17 @@
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 # ***** END LICENSE BLOCK *****
 """Generic ways to parallelize jobs.
 """
 
 
 # ChunkingMixin {{{1
 class ChunkingMixin(object):
-    """Generic signing helper methods.
+    """Generic Chunking helper methods.
     """
     def query_chunked_list(self, possible_list, this_chunk, total_chunks,
                            sort=False):
         """Split a list of items into a certain number of chunks and
         return the subset of that will occur in this chunk.
 
         Ported from build.l10n.getLocalesForChunk in build/tools.
         """
--- a/testing/mozharness/mozharness/mozilla/l10n/locales.py
+++ b/testing/mozharness/mozharness/mozilla/l10n/locales.py
@@ -11,21 +11,20 @@ import os
 from urlparse import urljoin
 import pprint
 import sys
 from copy import deepcopy
 
 sys.path.insert(1, os.path.dirname(sys.path[0]))
 
 from mozharness.base.config import parse_config_file
-from mozharness.base.parallel import ChunkingMixin
 
 
 # LocalesMixin {{{1
-class LocalesMixin(ChunkingMixin):
+class LocalesMixin(object):
     def __init__(self, **kwargs):
         """ Mixins generally don't have an __init__.
         This breaks super().__init__() for children.
         However, this is needed to override the query_abs_dirs()
         """
         self.abs_dirs = None
         self.locales = None
         self.gecko_locale_revisions = None
@@ -34,23 +33,21 @@ class LocalesMixin(ChunkingMixin):
     def query_locales(self):
         if self.locales is not None:
             return self.locales
         c = self.config
         ignore_locales = c.get("ignore_locales", [])
         additional_locales = c.get("additional_locales", [])
         # List of locales can be set by using different methods in the
         # following order:
-        # 1. "locales" buildbot property: a string of locale:revision separated
-        # by space
-        # 2. "MOZ_LOCALES" env variable: a string of locale:revision separated
+        # 1. "MOZ_LOCALES" env variable: a string of locale:revision separated
         # by space
-        # 3. self.config["locales"] which can be either coming from the config
+        # 2. self.config["locales"] which can be either coming from the config
         # or from --locale command line argument
-        # 4. using self.config["locales_file"] l10n changesets file
+        # 3. using self.config["locales_file"] l10n changesets file
         locales = None
 
         # Environment variable
         if not locales and "MOZ_LOCALES" in os.environ:
             self.debug("Using locales from environment: %s" %
                        os.environ["MOZ_LOCALES"])
             locales = os.environ["MOZ_LOCALES"].split()
 
@@ -87,23 +84,16 @@ class LocalesMixin(ChunkingMixin):
 
         for locale in additional_locales:
             if locale not in locales:
                 self.debug("Adding locale %s." % locale)
                 locales.append(locale)
 
         if not locales:
             return None
-        if 'total_locale_chunks' and 'this_locale_chunk' in c:
-            self.debug("Pre-chunking locale list: %s" % str(locales))
-            locales = self.query_chunked_list(locales,
-                                              c['this_locale_chunk'],
-                                              c['total_locale_chunks'],
-                                              sort=True)
-            self.debug("Post-chunking locale list: %s" % locales)
         self.locales = locales
         return self.locales
 
     def list_locales(self):
         """ Stub action method.
         """
         self.info("Locale list: %s" % str(self.query_locales()))
 
--- a/testing/mozharness/scripts/desktop_l10n.py
+++ b/testing/mozharness/scripts/desktop_l10n.py
@@ -88,28 +88,16 @@ class DesktopSingleLocale(LocalesMixin, 
     ], [
         ['--revision', ],
         {"action": "store",
          "dest": "revision",
          "type": "string",
          "help": "Override the gecko revision to use (otherwise use automation supplied"
                  " value, or en-US revision) "}
     ], [
-        ['--this-chunk', ],
-        {"action": "store",
-         "dest": "this_locale_chunk",
-         "type": "int",
-         "help": "Specify which chunk of locales to run"}
-    ], [
-        ['--total-chunks', ],
-        {"action": "store",
-         "dest": "total_locale_chunks",
-         "type": "int",
-         "help": "Specify the total number of chunks of locales"}
-    ], [
         ['--en-us-installer-url', ],
         {"action": "store",
          "dest": "en_us_installer_url",
          "type": "string",
          "help": "Specify the url of the en-us binary"}
     ], [
         ['--scm-level'], {  # Ignored on desktop for now: see Bug 1414678.
          "action": "store",
--- a/testing/mozharness/scripts/mobile_l10n.py
+++ b/testing/mozharness/scripts/mobile_l10n.py
@@ -65,30 +65,16 @@ class MobileSingleLocale(LocalesMixin,
         {"action": "store",
          "dest": "key_alias",
          "type": "choice",
          "default": "nightly",
          "choices": ["nightly", "release"],
          "help": "Specify the signing key alias"
          }
     ], [
-        ['--this-chunk', ],
-        {"action": "store",
-         "dest": "this_locale_chunk",
-         "type": "int",
-         "help": "Specify which chunk of locales to run"
-         }
-    ], [
-        ['--total-chunks', ],
-        {"action": "store",
-         "dest": "total_locale_chunks",
-         "type": "int",
-         "help": "Specify the total number of chunks of locales"
-         }
-    ], [
         ['--revision', ],
         {"action": "store",
          "dest": "revision",
          "type": "string",
          "help": "Override the gecko revision to use (otherwise use automation supplied"
                  " value, or en-US revision) "}
     ], [
         ['--scm-level'],