Bug 1466222 - Don't define submit-to-balrog action nor inherit from BalrogMixin, balrog-props.json is now dead. r=catlee
☠☠ backed out by ea2226175bc8 ☠ ☠
authorJustin Wood <Callek@gmail.com>
Fri, 01 Jun 2018 23:29:25 -0400
changeset 421220 79d7e88f2364f794b572593830ff7490d8f7f56f
parent 421219 9611aead3e0e3375e3a3df0ed0bb9ffdca244e6c
child 421221 6c75102894df3985d9719c92467d7e96807b1985
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 - Don't define submit-to-balrog action nor inherit from BalrogMixin, balrog-props.json is now dead. r=catlee for "Cleanup l10n mozharness config files." Differential Revision: https://phabricator.services.mozilla.com/D1512
taskcluster/ci/nightly-l10n/kind.yml
testing/mozharness/scripts/desktop_l10n.py
testing/mozharness/scripts/mobile_l10n.py
--- a/taskcluster/ci/nightly-l10n/kind.yml
+++ b/taskcluster/ci/nightly-l10n/kind.yml
@@ -213,16 +213,16 @@ job-template:
                - single_locale/tc_common.py
                - single_locale/tc_android-api-16.py
       # no default, so we fail on new entries
       options:
          - revision=$GECKO_HEAD_REV
       actions:
          by-build-platform:
             default: ['clone-locales', 'list-locales', 'setup', 'repack',
-                      'submit-to-balrog', 'summary']
+                      'summary']
             android-api-16-nightly: ['get-secrets',
                                      'clone-locales', 'list-locales', 'setup', 'repack',
-                                     'upload-repacks', 'submit-to-balrog', 'summary']
+                                     'upload-repacks', 'summary']
       script:
          by-build-platform:
             default: mozharness/scripts/desktop_l10n.py
             android-api-16-nightly: mozharness/scripts/mobile_l10n.py
--- a/testing/mozharness/scripts/desktop_l10n.py
+++ b/testing/mozharness/scripts/desktop_l10n.py
@@ -23,17 +23,16 @@ from mozharness.base.transfer import Tra
 from mozharness.base.vcs.vcsbase import VCSMixin
 from mozharness.mozilla.automation import AutomationMixin
 from mozharness.mozilla.building.buildbase import (
     MakeUploadOutputParser,
     get_mozconfig_path,
 )
 from mozharness.mozilla.l10n.locales import LocalesMixin
 from mozharness.mozilla.mar import MarMixin
-from mozharness.mozilla.updates.balrog import BalrogMixin
 from mozharness.base.python import VirtualenvMixin
 
 try:
     import simplejson as json
     assert json
 except ImportError:
     import json
 
@@ -59,17 +58,17 @@ runtime_config_tokens = ('buildid', 'ver
                          'abs_objdir', 'revision',
                          'to_buildid', 'en_us_binary_url',
                          'en_us_installer_binary_url', 'mar_tools_url',
                          'who')
 
 
 # DesktopSingleLocale {{{1
 class DesktopSingleLocale(LocalesMixin, AutomationMixin,
-                          VCSMixin, BaseScript, BalrogMixin, MarMixin,
+                          VCSMixin, BaseScript, MarMixin,
                           VirtualenvMixin, TransferMixin):
     """Manages desktop repacks"""
     config_options = [[
         ['--locale', ],
         {"action": "extend",
          "dest": "locales",
          "type": "string",
          "help": "Specify the locale(s) to sign and update. Optionally pass"
@@ -127,17 +126,16 @@ class DesktopSingleLocale(LocalesMixin, 
         buildscript_kwargs = {
             'all_actions': [
                 "clone-locales",
                 "list-locales",
                 "setup",
                 "repack",
                 "taskcluster-upload",
                 "funsize-props",
-                "submit-to-balrog",
                 "summary",
             ],
             'config': {
                 "ignore_locales": ["en-US"],
                 "locales_dir": "browser/locales",
                 "buildid_section": "App",
                 "buildid_option": "BuildID",
                 "application_ini": "application.ini",
@@ -682,44 +680,16 @@ class DesktopSingleLocale(LocalesMixin, 
         dirs['abs_tools_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'tools')
         dirs['abs_src_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'src')
         for key in dirs.keys():
             if key not in abs_dirs:
                 abs_dirs[key] = dirs[key]
         self.abs_dirs = abs_dirs
         return self.abs_dirs
 
-    def submit_to_balrog(self):
-        """submit to balrog"""
-        self.info("Reading build properties...")
-        # get platform, appName and hashType from configuration
-        # common values across different locales
-        config = self.config
-        platform = config["platform"]
-        appName = config['appName']
-        branch = config['branch']
-        # values from configuration
-        self.set_property("branch", branch)
-        self.set_property("appName", appName)
-        # it's hardcoded to sha512 in balrog.py
-        self.set_property("platform", platform)
-        # values common to the current repacks
-        self.set_property("buildid", self._query_buildid())
-        self.set_property("appVersion", self.query_version())
-
-        # YAY
-        def balrog_props_wrapper(locale):
-            env = self._query_upload_env()
-            props_path = os.path.join(env["UPLOAD_PATH"], locale,
-                                      'balrog_props.json')
-            self.generate_balrog_props(props_path)
-            return SUCCESS
-
-        self._map(balrog_props_wrapper, self.query_locales())
-
     def _mar_binaries(self):
         """returns a tuple with mar and mbsdiff paths"""
         config = self.config
         return (config['mar'], config['mbsdiff'])
 
     def _mar_dir(self, dirname):
         """returns the full path of dirname;
             dirname is an entry in configuration"""
--- a/testing/mozharness/scripts/mobile_l10n.py
+++ b/testing/mozharness/scripts/mobile_l10n.py
@@ -27,25 +27,23 @@ sys.path.insert(1, os.path.dirname(sys.p
 from mozharness.base.errors import MakefileErrorList
 from mozharness.base.log import OutputParser
 from mozharness.base.transfer import TransferMixin
 from mozharness.mozilla.automation import AutomationMixin
 from mozharness.mozilla.tooltool import TooltoolMixin
 from mozharness.base.vcs.vcsbase import MercurialScript
 from mozharness.mozilla.l10n.locales import LocalesMixin
 from mozharness.mozilla.secrets import SecretsMixin
-from mozharness.mozilla.updates.balrog import BalrogMixin
 from mozharness.base.python import VirtualenvMixin
 
 
 # MobileSingleLocale {{{1
 class MobileSingleLocale(LocalesMixin,
                          TransferMixin, TooltoolMixin, AutomationMixin,
-                         MercurialScript, BalrogMixin,
-                         VirtualenvMixin, SecretsMixin):
+                         MercurialScript, VirtualenvMixin, SecretsMixin):
     config_options = [[
         ['--locale', ],
         {"action": "extend",
          "dest": "locales",
          "type": "string",
          "help": "Specify the locale(s) to sign and update"
          }
     ], [
@@ -109,17 +107,16 @@ class MobileSingleLocale(LocalesMixin,
                 "get-secrets",
                 "clone-locales",
                 "list-locales",
                 "setup",
                 "repack",
                 "validate-repacks-signed",
                 "upload-repacks",
                 "create-virtualenv",
-                "submit-to-balrog",
                 "summary",
             ],
             'config': {
                 'virtualenv_modules': [
                     'requests==2.8.1',
                 ],
                 'virtualenv_path': 'venv',
             },
@@ -511,69 +508,13 @@ class MobileSingleLocale(LocalesMixin,
                        (apkdir, apks), exit_code=1)
 
         return os.path.join(apkdir, apks[0])
 
     def query_is_release_or_beta(self):
 
         return bool(self.config.get("is_release_or_beta"))
 
-    def submit_to_balrog(self):
-        if not self.query_is_nightly() and not self.query_is_release_or_beta():
-            self.info("Not a nightly or release build, skipping balrog submission.")
-            return
-
-        self.checkout_tools()
-
-        locales = self.query_locales()
-        if not self.config.get('taskcluster_nightly'):
-            balrogReady = True
-            for locale in locales:
-                apk_url = self.query_upload_url(locale)
-                if not apk_url:
-                    self.add_failure(locale, message="Failed to detect %s url in make upload!" %
-                                     (locale))
-                    balrogReady = False
-                    continue
-            if not balrogReady:
-                return self.fatal(message="Not all repacks successful, abort without "
-                                          "submitting to balrog.")
-
-        env = self.query_upload_env()
-        for locale in locales:
-            apkfile = self.query_apkfile_path(locale)
-            if self.config.get('taskcluster_nightly'):
-                # Taskcluster needs stage_platform
-                self.set_property("stage_platform", self.config.get("stage_platform"))
-                self.set_property("branch", self.config.get("branch"))
-            else:
-                apk_url = self.query_upload_url(locale)
-                self.set_property("completeMarUrl", apk_url)
-
-                # The Balrog submitter translates this platform into a build target
-                # via https://github.com/mozilla/build-tools/blob/master/lib/python/release/platforms.py#L23  # noqa
-                self.set_property(
-                    "platform",
-                    self.config["properties"]["platform"])
-                # TODO: Is there a better way to get this?
-
-            # Set other necessary properties for Balrog submission. None need to
-            # be passed back to automation, so we won't write them to the properties
-            # files.
-            self.set_property("locale", locale)
-
-            self.set_property("appVersion", self.query_version())
-
-            self.set_property("appName", "Fennec")
-            self.set_property("completeMarSize", self.query_filesize(apkfile))
-            self.set_property("completeMarHash", self.query_sha512sum(apkfile))
-            self.set_property("isOSUpdate", False)
-            self.set_property("buildid", self.query_buildid())
-
-            props_path = os.path.join(env["UPLOAD_PATH"], locale,
-                                      'balrog_props.json')
-            self.generate_balrog_props(props_path)
-
 
 # main {{{1
 if __name__ == '__main__':
     single_locale = MobileSingleLocale()
     single_locale.run_and_exit()