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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Connor Sheehan 2018-11-12 14:57:59 +00:00
Родитель dde148da52
Коммит d8e73dd962
1 изменённых файлов: 2 добавлений и 9 удалений

Просмотреть файл

@ -8,7 +8,6 @@ import errno
import json
import os
import platform
import random
import subprocess
import sys
import uuid
@ -122,10 +121,6 @@ CATEGORIES = {
}
# 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]
@ -278,9 +273,7 @@ def bootstrap(topsrcdir, mozilla_dir=None):
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:
@ -288,7 +281,7 @@ def bootstrap(topsrcdir, mozilla_dir=None):
'--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):