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:
Matan Lurey
2025-03-22 10:48:57 -07:00
committed by GitHub
parent 6f6cc0a0fb
commit 05f1980eae
8 changed files with 247 additions and 770 deletions

View File

@@ -8,12 +8,12 @@ import 'dart:io';
import 'package:args/command_runner.dart';
import 'package:flutter_devicelab/command/test.dart';
import 'package:flutter_devicelab/command/upload_results.dart';
import 'package:flutter_devicelab/command/upload_metrics.dart';
final CommandRunner<void> runner =
CommandRunner<void>('devicelab_runner', 'DeviceLab test runner for recording test results')
..addCommand(TestCommand())
..addCommand(UploadResultsCommand());
..addCommand(UploadMetricsCommand());
Future<void> main(List<String> rawArgs) async {
unawaited(