Skip to content

do not reRequest CheckRun - #5142

Open
ievdokdm wants to merge 1 commit into
flutter:mainfrom
ievdokdm:191610-merge
Open

do not reRequest CheckRun#5142
ievdokdm wants to merge 1 commit into
flutter:mainfrom
ievdokdm:191610-merge

Conversation

@ievdokdm

Copy link
Copy Markdown
Contributor

attempt to solve mysterious merge without unlocked merge queue guard
flutter/flutter#191610

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 31, 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 refactors the handling of dashboard checks. It moves the logic for resetting dashboard checks to neutral from the scheduler (which now ignores re-run requests for these checks) to the LuciBuildService when the presubmit guard has no failed jobs. The review feedback recommends explicitly setting the check run status to completed when updating it to a neutral conclusion to comply with GitHub API requirements, along with updating the corresponding test verifications.

Comment on lines +469 to +478
await _githubChecksUtil.updateCheckRun(
_config,
slug,
dashboardChecks,
conclusion: CheckRunConclusion.neutral,
output: const CheckRunOutput(
title: Config.kDashboardCheckName,
summary: Scheduler.kDashboardChecksDescription,
),
);

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

When updating a check run with a conclusion (such as CheckRunConclusion.neutral), GitHub API requires the status to be set to completed. Explicitly passing status: CheckRunStatus.completed avoids potential API validation errors or unexpected behavior.

Suggested change
await _githubChecksUtil.updateCheckRun(
_config,
slug,
dashboardChecks,
conclusion: CheckRunConclusion.neutral,
output: const CheckRunOutput(
title: Config.kDashboardCheckName,
summary: Scheduler.kDashboardChecksDescription,
),
);
await _githubChecksUtil.updateCheckRun(
_config,
slug,
dashboardChecks,
status: CheckRunStatus.completed,
conclusion: CheckRunConclusion.neutral,
output: const CheckRunOutput(
title: Config.kDashboardCheckName,
summary: Scheduler.kDashboardChecksDescription,
),
);

Comment on lines 691 to 702
verify(
mockCheckRunsService.reRequestCheckRun(
mockGithubChecksUtil.updateCheckRun(
any,
RepositorySlug.full('flutter/flutter'),
checkRunId: 1234,
checkRunGuard,
conclusion: CheckRunConclusion.neutral,
output: const CheckRunOutput(
title: Config.kDashboardCheckName,
summary: Scheduler.kDashboardChecksDescription,
),
),
).called(1);

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

Update the test verification to match the explicit status: CheckRunStatus.completed parameter added to the updateCheckRun call.

        verify(
          mockGithubChecksUtil.updateCheckRun(
            any,
            RepositorySlug.full('flutter/flutter'),
            checkRunGuard,
            status: CheckRunStatus.completed,
            conclusion: CheckRunConclusion.neutral,
            output: const CheckRunOutput(
              title: Config.kDashboardCheckName,
              summary: Scheduler.kDashboardChecksDescription,
            ),
          ),
        ).called(1);

@ievdokdm ievdokdm changed the title do not reRequestCheckRun do not reRequest CheckRun Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant