Skip to content

Don't mark dashboard checks as neutral on rerun. - #5154

Merged
auto-submit[bot] merged 3 commits into
flutter:mainfrom
eyebrowsoffire:remove_neutral_dashboard
Sep 21, 2026
Merged

auto-submit[bot] merged 3 commits into
flutter:mainfrom
eyebrowsoffire:remove_neutral_dashboard

Conversation

@eyebrowsoffire

@eyebrowsoffire eyebrowsoffire commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

This is causing some PRs to autosubmit with failing checks. Ideally, we'd actually rerun failed checks when this is clicked. For now, we should make this a no-op.

This should address the main issue with flutter/flutter#191610 for now.

This is causing some PRs to autosubmit with failing checks. Ideally, we'd
actually rerun failed checks when this is clicked. For now, we should make
this a no-op.
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Sep 21, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request simplifies the scheduler logic in scheduler.dart by grouping Config.kDashboardCheckName with Config.kMergeQueueLockName to ignore re-run requests, removing the previous try-catch block that reset dashboard checks to neutral. The review feedback recommends enhancing null safety by replacing repeated null assertion operators (!) with null-safe navigation (?.) to prevent potential runtime crashes.

Comment on lines 1711 to 1716
final checkSuiteId = checkRunEvent.checkRun!.checkSuite!.id!;
log.debug(
'$logCrumb: Requested re-run of "$name" for '
'$slug / $checkSuiteId - ignoring',
);
success = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To adhere to defensive programming and Dart's null safety best practices, avoid using the null assertion operator (!) repeatedly (e.g., checkRunEvent.checkRun!.checkSuite!.id!). If any of these fields are unexpectedly null (for example, in unit tests or due to API changes), it will cause a runtime crash. Instead, use null-safe navigation (?.) and handle the null case gracefully.

Suggested change
final checkSuiteId = checkRunEvent.checkRun!.checkSuite!.id!;
log.debug(
'$logCrumb: Requested re-run of "$name" for '
'$slug / $checkSuiteId - ignoring',
);
success = true;
final checkSuiteId = checkRunEvent.checkRun?.checkSuite?.id;
if (checkSuiteId == null) {
log.warn('$logCrumb: Requested re-run of "$name" but checkSuiteId was null');
return const ProcessCheckRunResult.success();
}
log.debug(
'$logCrumb: Requested re-run of "$name" for '
'$slug / $checkSuiteId - ignoring',
);
success = true;

@ievdokdm

Copy link
Copy Markdown
Contributor

@eyebrowsoffire

Copy link
Copy Markdown
Contributor Author

you also have to remove https://github.com/flutter/cocoon/blob/main/app_dart/lib/src/service/luci_build_service.dart#L448-L483

Is this code path just failing currently (and being caught by the try catch)?

@eyebrowsoffire

Copy link
Copy Markdown
Contributor Author

After discussing offline: the code path in question just kicks off a rerequested event, which triggers the code path I'm deleting. The rerequested event doesn't do anything else, so we can get rid of the source of the event.

@ievdokdm ievdokdm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
with that change developers no longer would be able to add autosubmit label for PR where all failed check-runs were re-run requested in flutter/flutter#191005

@eyebrowsoffire eyebrowsoffire added the autosubmit Merge PR when tree becomes green via auto submit App. label Sep 21, 2026
@auto-submit
auto-submit Bot merged commit e6c186a into flutter:main Sep 21, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App. CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants