Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app_dart/lib/src/service/firestore/unified_check_run.dart
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ For CI stage ${guardId.stage}:
'to "${state.status.name}".',
);
} catch (e) {
log.error('$logCrumb: failed to update presubmit check', e);
log.info('$logCrumb: failed to update presubmit check', e);
rethrow;
}
}
Expand Down
11 changes: 7 additions & 4 deletions app_dart/lib/src/service/github_checks_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,25 @@ class GithubChecksService {
/// Appends triage wiki page to `summaryMarkdown` from LUCI build so that people can easily
/// reference from github check run page.
String getGithubSummary(String? summary) {
return getGithubSummaryWithHeader(kGithubSummary, summary);
}

String getGithubSummaryWithHeader(String header, String? summary) {
if (summary == null) {
return '${kGithubSummary}Empty summaryMarkdown';
return '${header}Empty summaryMarkdown';
}
// This is an imposed GitHub limit
const checkSummaryLimit = 65535;
// This is to give buffer room incase GitHub lowers the amount.
const checkSummaryBufferLimit =
checkSummaryLimit - 10000 - kGithubSummary.length;
final checkSummaryBufferLimit = checkSummaryLimit - 10000 - header.length;
// Return the last [checkSummaryBufferLimit] characters as they are likely the most relevant.
if (summary.length > checkSummaryBufferLimit) {
final truncatedSummary = summary.substring(
summary.length - checkSummaryBufferLimit,
);
summary = '[TRUNCATED...] $truncatedSummary';
}
return '$kGithubSummary$summary';
return '$header$summary';
}

/// Relevant APIs:
Expand Down
17 changes: 10 additions & 7 deletions app_dart/lib/src/service/scheduler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ $s
status: CheckRunStatus.completed,
conclusion: CheckRunConclusion.failure,
output: CheckRunOutput(
title: Config.kCiYamlCheckName,
title: Config.kMergeQueueLockName,
summary: summary,
text: details,
),
Expand Down Expand Up @@ -900,12 +900,11 @@ detailsUrl: $detailsUrl
status: CheckRunStatus.completed,
conclusion: CheckRunConclusion.actionRequired,
output: CheckRunOutput(
title: Config.kCiYamlCheckName,
title: Config.kMergeQueueLockName,
summary: summary,
text: details,
),
// temporary disabled due to https://github.com/flutter/flutter/issues/181425
//detailsUrl: detailsUrl,
detailsUrl: detailsUrl,
actions: [
const CheckRunAction(
label: 'Re-run Failed',
Expand Down Expand Up @@ -1097,15 +1096,19 @@ detailsUrl: $detailsUrl
);
} else if (check.isUnifiedCheckRun) {
final guard = checkRunFromString(stagingConclusion.checkRunGuard!);
final detailsUrl =
'https://flutter-dashboard.appspot.com/#/presubmit?repo=${check.slug.name}&checkrun=${check.guardId.checkRunId}';
await _requireActionForGuard(
slug: check.slug,
lock: guard,
headSha: check.sha,
summary: kMergeQueueLockDescription,
summary: _githubChecksService.getGithubSummaryWithHeader('''
**[Failed Checks Details]($detailsUrl)**

''', kMergeQueueLockDescription),
details:
'For CI stage ${check.stage} ${stagingConclusion.failed} checks failed',
detailsUrl:
'https://flutter-dashboard.appspot.com/repo/${check.slug.name}/checkrun/${check.guardId}',
detailsUrl: detailsUrl,
);
}
return true;
Expand Down
Loading