Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: tools/gardening/lib/src/compare_failures_impl.dart

Issue 2999353002: Adjusted compare-failures to report logdog URLs: Use a regular one! (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gardening/lib/src/compare_failures_impl.dart
diff --git a/tools/gardening/lib/src/compare_failures_impl.dart b/tools/gardening/lib/src/compare_failures_impl.dart
index 6104fba670f634b52c1e6e94d27d8021301525c0..c808102334eb10b4872e21509d5fda126be089df 100644
--- a/tools/gardening/lib/src/compare_failures_impl.dart
+++ b/tools/gardening/lib/src/compare_failures_impl.dart
@@ -7,6 +7,7 @@
/// Use this to detect flakiness of failures, especially timeouts.
import 'dart:async';
+import 'dart:io';
import 'package:gardening/src/bot.dart';
import 'package:gardening/src/buildbot_structures.dart';
@@ -18,12 +19,22 @@ Future mainInternal(Bot bot, List<String> args, {int runCount: 10}) async {
await loadBuildResults(bot, args, runCount: runCount), args);
}
+RegExp logdogUrlRegexp =
+ new RegExp(r'https://luci-logdog.appspot.com/.*client.dart');
+
/// Loads [BuildResult]s for the [runCount] last builds for the build(s) in
/// [args]. [args] can be a list of [BuildGroup] names or a list of log uris.
Future<Map<BuildUri, List<BuildResult>>> loadBuildResults(
Bot bot, List<String> args,
{int runCount: 10}) async {
List<BuildUri> buildUriList = <BuildUri>[];
+ for (String arg in args) {
+ if (logdogUrlRegexp.hasMatch(arg)) {
+ print('Encountered a logdog URI ("${arg.substring(0,40)}...").');
+ print('Please use the regular log URI, even with --logdog.');
+ exit(-1);
+ }
+ }
for (BuildGroup buildGroup in buildGroups) {
if (args.contains(buildGroup.groupName)) {
buildUriList.addAll(buildGroup.createUris(bot.mostRecentBuildNumber));
@@ -128,6 +139,7 @@ class Summary {
Summary(this.buildUri, this.results) {
for (BuildResult result in results) {
+ if (result == null) continue;
timeoutIds
.addAll(result.timeouts.map((TestFailure failure) => failure.id));
errorIds.addAll(result.errors.map((TestFailure failure) => failure.id));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698