Bug 1505086: remove build telemetry submission logic r=ted
authorConnor Sheehan <sheehan@mozilla.com>
Mon, 12 Nov 2018 14:57:59 +0000
changeset 445886 96046dff0022da18603a359733514a4ff0efc799
parent 445885 9a2f0d443bb1d94c38da120b790fcad6245b77d7
child 445887 b05772bcb6f4e6e7e83cb7e05d12d160f82f65b5
push id35028
push usercsabou@mozilla.com
push dateMon, 12 Nov 2018 21:54:15 +0000
treeherdermozilla-central@05331fb8f533 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1505086
milestone65.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 1505086: remove build telemetry submission logic r=ted Currently, build telemetry submits at random, approximately every 10 `mach` invocations. This choice was made arbitrarily, with no real reason in mind for that level of frequency. After speaking with some of the data engineers in #telemetry, it seems we should be able to send pings to the telemetry pipeline far more frequently than we realized. This commit removes the telemetry submission logic and causes clients to attempt to send pings for every mach invocation. Pings are still saved to the outgoing directory, in case of a failure or in the case of offline `mach` runs. Differential Revision: https://phabricator.services.mozilla.com/D11279
build/mach_bootstrap.py
--- a/build/mach_bootstrap.py
+++ b/build/mach_bootstrap.py
@@ -3,17 +3,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import print_function, unicode_literals
 
 import errno
 import json
 import os
 import platform
-import random
 import subprocess
 import sys
 import uuid
 import __builtin__
 
 from types import ModuleType
 
 
@@ -117,20 +116,16 @@ CATEGORIES = {
         'long': 'The disabled commands are hidden by default. Use -v to display them. '
         'These commands are unavailable for your current context, '
         'run "mach <command>" to see why.',
         'priority': 0,
     },
 }
 
 
-# We submit data to telemetry approximately every this many mach invocations
-TELEMETRY_SUBMISSION_FREQUENCY = 10
-
-
 def search_path(mozilla_dir, packages_txt):
     with open(os.path.join(mozilla_dir, packages_txt)) as f:
         packages = [line.rstrip().split(':') for line in f]
 
     def handle_package(package):
         if package[0] == 'optional':
             try:
                 for path in handle_package(package[1:]):
@@ -273,27 +268,25 @@ def bootstrap(topsrcdir, mozilla_dir=Non
 
             with open(os.path.join(outgoing_dir, str(uuid.uuid4()) + '.json'),
                       'w') as f:
                 json.dump(data, f, sort_keys=True)
 
         if should_skip_telemetry_submission(handler):
             return True
 
-        # But only submit about every n-th operation
-        if random.randint(1, TELEMETRY_SUBMISSION_FREQUENCY) != 1:
-            return
+        state_dir, _ = get_state_dir()
 
         machpath = os.path.join(instance.topsrcdir, 'mach')
         with open(os.devnull, 'wb') as devnull:
             subprocess.Popen([machpath, 'python',
                               '--no-virtualenv',
                               os.path.join(topsrcdir, 'build',
                                            'submit_telemetry_data.py'),
-                              get_state_dir()[0]],
+                              state_dir],
                              stdout=devnull, stderr=devnull)
 
     def populate_context(context, key=None):
         if key is None:
             return
         if key == 'state_dir':
             state_dir, is_environ = get_state_dir()
             if is_environ: