Skip to content

Update Presubmit check-run only if number of failed jobs changed. - #5169

Merged
auto-submit[bot] merged 1 commit into
flutter:mainfrom
ievdokdm:194455-presubmit-update
Nov 2, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:mainfrom
ievdokdm:194455-presubmit-update

Conversation

@ievdokdm

@ievdokdm ievdokdm commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

fix: flutter/flutter#194455

Previously, once a job failed, every subsequent build event triggered a redundant GitHub API call to update the Presubmit check run even when the job succeeded.

Since we display a list of failed jobs in a Presubmit check run description we still have to update it every time new job failed or failed job re-run.

Added failedCountChanged to PresubmitGuardConclusion (set in UnifiedCheckRun.markConclusion) and updated Scheduler.processBuildCompleted to only update the Presubmit check run when the number of failed jobs changes.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 20, 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 introduces tracking of whether the failed job count has changed (failedCountChanged) in PresubmitGuardConclusion and UnifiedCheckRun. This is used in Scheduler to conditionally trigger _requireActionForPresubmit only when the failed count changes, avoiding redundant updates. However, a critical issue was identified where the Presubmit check run can get stuck in the inProgress state indefinitely if a retried job succeeds but another job remains failed (meaning the failed count doesn't change, but there are no remaining jobs). It is recommended to update the condition to also trigger when there are no remaining jobs (stagingConclusion.remaining == 0).

Comment thread app_dart/lib/src/service/scheduler.dart Resolved
@ievdokdm
ievdokdm force-pushed the 194455-presubmit-update branch from c7fea7d to c68a021 Compare October 30, 2026 20:31
@ievdokdm
ievdokdm force-pushed the 194455-presubmit-update branch from c68a021 to 1d563b2 Compare November 2, 2026 19:08

@eyebrowsoffire eyebrowsoffire 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!

@ievdokdm ievdokdm added the autosubmit Merge PR when tree becomes green via auto submit App. label Nov 2, 2026
@auto-submit
auto-submit Bot merged commit 1a07b26 into flutter:main Nov 2, 2026
27 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.

Update Presubmit check only if failed jobs count changed

2 participants