forked from firka/flutter
skip staging update (#89137)
This commit is contained in:
@@ -24,6 +24,7 @@ class UploadResultsCommand extends Command<void> {
|
||||
argParser.addOption('task-name', help: '[Flutter infrastructure] Name of the task being run on.');
|
||||
argParser.addOption('test-status', help: 'Test status: Succeeded|Failed');
|
||||
argParser.addOption('commit-time', help: 'Commit time in UNIX timestamp');
|
||||
argParser.addOption('builder-bucket', help: '[Flutter infrastructure] Luci builder bucket the test is running in.');
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -42,27 +43,22 @@ class UploadResultsCommand extends Command<void> {
|
||||
final String? testStatus = argResults!['test-status'] as String?;
|
||||
final String? commitTime = argResults!['commit-time'] as String?;
|
||||
final String? taskName = argResults!['task-name'] as String?;
|
||||
final String? builderBucket = argResults!['builder-bucket'] as String?;
|
||||
|
||||
// Upload metrics to metrics_center from test runner when `commitTime` is specified. This
|
||||
// is mainly for testing purpose.
|
||||
// The upload step will be skipped from cocoon once this is validated.
|
||||
// TODO(keyong): remove try block to block test when this is validated to work https://github.com/flutter/flutter/issues/88484
|
||||
try {
|
||||
if (commitTime != null) {
|
||||
await uploadToMetricsCenter(resultsPath, commitTime, taskName);
|
||||
print('Successfully uploaded metrics to metrics center');
|
||||
}
|
||||
} on Exception catch (e, stacktrace) {
|
||||
print('Uploading metrics failure: $e\n\n$stacktrace');
|
||||
// Upload metrics to skia perf from test runner when `resultsPath` is specified.
|
||||
if (resultsPath != null) {
|
||||
await uploadToSkiaPerf(resultsPath, commitTime, taskName);
|
||||
print('Successfully uploaded metrics to skia perf');
|
||||
}
|
||||
|
||||
final Cocoon cocoon = Cocoon(serviceAccountTokenPath: serviceAccountTokenFile);
|
||||
return cocoon.sendResultsPath(
|
||||
return cocoon.sendTaskStatus(
|
||||
resultsPath: resultsPath,
|
||||
isTestFlaky: testFlakyStatus == 'True',
|
||||
gitBranch: gitBranch,
|
||||
builderName: builderName,
|
||||
testStatus: testStatus,
|
||||
builderBucket: builderBucket,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user