Skip to content

Commit a89e504

Browse files
authored
Disable stats from fireci (#2373)
Remove any calls to the stats package in ci since it's breaking
1 parent dc1eca2 commit a89e504

File tree

5 files changed

+4
-15
lines changed

5 files changed

+4
-15
lines changed

ci/fireci/fireci/commands.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
from . import gradle
2121
from . import ci_command
22-
from . import stats
2322

2423

2524
@click.argument('task', required=True, nargs=-1)
@@ -86,7 +85,7 @@ def api_information(auth_token, repo_name, issue_number):
8685
formatted_output_lines.append(line[line.find('error:'):])
8786
elif 'warning' in line:
8887
formatted_output_lines.append(line[line.find('warning:'):])
89-
88+
9089
if formatted_output_lines:
9190
comment_string += 'The public api surface has changed for the subproject {}:\n'.format(subproject)
9291
comment_string += ''.join(formatted_output_lines)

ci/fireci/fireci/emulator.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import subprocess
2020
import time
2121

22-
from . import stats
23-
2422
_logger = logging.getLogger('fireci.emulator')
2523

2624
EMULATOR_BINARY = 'emulator'
@@ -67,7 +65,6 @@ def __init__(
6765
self._wait_for_device_stdin = wait_for_device_stdin
6866
self._logcat_stdin = logcat_stdin
6967

70-
@stats.measure_call("emulator_startup")
7168
def __enter__(self):
7269
_logger.info('Starting avd "{}..."'.format(self._name))
7370
self._process = subprocess.Popen(
@@ -89,7 +86,6 @@ def __enter__(self):
8986
stdout=self._adb_log,
9087
)
9188

92-
@stats.measure_call("emulator_shutdown")
9389
def __exit__(self, exception_type, exception_value, traceback):
9490
_logger.info('Shutting down avd "{}"...'.format(self._name))
9591
self._kill(self._process)

ci/fireci/fireci/gradle.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import subprocess
1818
import sys
1919

20-
from . import stats
2120

2221
_logger = logging.getLogger('fireci.gradle')
2322

@@ -29,15 +28,13 @@ def P(name, value):
2928
return '-P{}={}'.format(name, value)
3029

3130

32-
@stats.measure_call('gradle')
3331
def run(*args, gradle_opts='', workdir=None, check=True):
3432
"""Invokes gradle with specified args and gradle_opts."""
3533
new_env = dict(os.environ)
3634
if gradle_opts:
3735
new_env['GRADLE_OPTS'] = gradle_opts
3836
new_env[
3937
'ADB_INSTALL_TIMEOUT'] = ADB_INSTALL_TIMEOUT # 5 minutes, rather than 2 minutes
40-
stats.propagate_context_into(new_env)
4138

4239
command = ['./gradlew'] + list(args)
4340
_logger.info('Executing gradle command: "%s" in directory: "%s"',

ci/fireci/fireci/internal.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import shutil
2323

2424
from . import emulator
25-
from . import stats
2625

2726
_logger = logging.getLogger('fireci')
2827

@@ -119,8 +118,6 @@ def main(options, **kwargs):
119118
"""
120119
for k, v in kwargs.items():
121120
setattr(options, k, v)
122-
if options.enable_metrics:
123-
stats.configure()
124121

125122

126123
def ci_command(name=None):
@@ -142,7 +139,7 @@ def ci_command(f):
142139
@_pass_options
143140
@click.pass_context
144141
def new_func(ctx, options, *args, **kwargs):
145-
with stats.measure("cicmd:" + actual_name), _artifact_handler(
142+
with _artifact_handler(
146143
options.artifact_target_dir,
147144
options.artifact_patterns), _emulator_handler(
148145
options.with_emulator,

firebase-ml-modeldownloader/src/test/java/com/google/firebase/ml/modeldownloader/internal/FirebaseMlLoggerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public void logModelInfoRetrieverFailure_noHttpError() {
228228
.setErrorCode(ErrorCode.MODEL_INFO_DOWNLOAD_UNSUCCESSFUL_HTTP_STATUS)
229229
.setDownloadStatus(DownloadStatus.MODEL_INFO_RETRIEVAL_FAILED)
230230
.build())
231-
.setSystemInfo(SYSTEM_INFO)
231+
.setSystemInfo(systemInfo)
232232
.build()));
233233
verify(mockStatsSender, Mockito.times(1)).sendEvent(any());
234234
verify(mockSharedPreferencesUtil, never()).setModelDownloadCompleteTimeMs(any(), eq(2500L));
@@ -255,7 +255,7 @@ public void logModelInfoRetrieverFailure_withHttpError() {
255255
.setDownloadStatus(DownloadStatus.MODEL_INFO_RETRIEVAL_FAILED)
256256
.setDownloadFailureStatus(FirebaseMlException.INVALID_ARGUMENT)
257257
.build())
258-
.setSystemInfo(SYSTEM_INFO)
258+
.setSystemInfo(systemInfo)
259259
.build()));
260260
verify(mockStatsSender, Mockito.times(1)).sendEvent(any());
261261
verify(mockSharedPreferencesUtil, never()).setModelDownloadCompleteTimeMs(any(), eq(2500L));

0 commit comments

Comments
 (0)