Remove Cocoon from dev/devicelab, keeping Skia perf stats upload. (#165749)
Partial re-land of https://github.com/flutter/flutter/pull/165628: - Fixes the mistake that the `Cocoon` class did things that well, were not specific to Cocoon. - Renamed to `MetricsResultWriter`, as that is all it does now. --- Closes https://github.com/flutter/flutter/issues/165618. The `devicelab/bin/test_runner.dart upload-metrics` command use to have _two_ responsibilities: - Well, upload test **metrics** (benchmarks) to Skia Perf (it still does that) - Upload test **status** to Cocoon (it did until https://github.com/flutter/flutter/pull/165614) As https://github.com/flutter/flutter/pull/165614 proved, this API predated the current LUCI setup, where Cocoon itself receives task status updates from LUCI, and it turns out this entire time, DeviceLab was making (at best) NOP calls, and at worst, causing crashes and corrupt data (https://github.com/flutter/flutter/issues/165610).
This commit is contained in:
@@ -10,8 +10,8 @@ import 'package:meta/meta.dart';
|
||||
import 'package:vm_service/vm_service.dart';
|
||||
import 'package:vm_service/vm_service_io.dart';
|
||||
|
||||
import 'cocoon.dart';
|
||||
import 'devices.dart';
|
||||
import 'metrics_result_writer.dart';
|
||||
import 'task_result.dart';
|
||||
import 'utils.dart';
|
||||
|
||||
@@ -49,7 +49,7 @@ Future<void> runTasks(
|
||||
for (final String taskName in taskNames) {
|
||||
TaskResult result = TaskResult.success(null);
|
||||
int failureCount = 0;
|
||||
while (failureCount <= Cocoon.retryNumber) {
|
||||
while (failureCount <= MetricsResultWriter.retryNumber) {
|
||||
result = await rerunTask(
|
||||
taskName,
|
||||
deviceId: deviceId,
|
||||
@@ -137,7 +137,7 @@ Future<TaskResult> rerunTask(
|
||||
section('Finished task "$taskName"');
|
||||
|
||||
if (resultsPath != null) {
|
||||
final Cocoon cocoon = Cocoon();
|
||||
final MetricsResultWriter cocoon = MetricsResultWriter();
|
||||
await cocoon.writeTaskResultToFile(
|
||||
builderName: luciBuilder,
|
||||
gitBranch: gitBranch,
|
||||
|
||||
Reference in New Issue
Block a user