-
Notifications
You must be signed in to change notification settings - Fork 100
Unified Check Run flow implementation #4906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ck Run Flow - Updated `GithubChecksService` to use the new `isTaskFailed` method for checking task failure. - Removed the deprecated `taskFailed` method from `GithubChecksService`. - Modified `LuciBuildService` to support unified check run flow, including changes to method signatures and logic for scheduling builds. - Enhanced `PresubmitUserData` to include optional fields for guard check run ID and stage. - Updated JSON serialization for `PresubmitUserData` to handle new fields. - Refactored `Scheduler` to integrate unified check run logic, including changes to document initialization and task scheduling. - Adjusted tests to reflect changes in method signatures and logic, ensuring proper mocking and verification.
| build.summaryMarkdown = (await _luciBuildService.getBuildById( | ||
| build.id, | ||
| buildMask: bbv2.BuildMask( | ||
| // Need to use allFields as there is a bug with fieldMask and summaryMarkdown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug with our implementation or somewhere is? issue tracking id?
| if (!rescheduled && config.flags.closeMqGuardAfterPresubmit || | ||
| !rescheduled && userData.guardCheckRunId != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on:
final hasGuardCheckRunId = userData.guardCheckRunId != null;
if (!rescheduled && (config.flags.closeMqGuardAfterPresubmit || hasGuardCheckRunId))
and then later:
id: hasGuardCheckRunId ? userData.guardCheckRunId! | userData.checkRunId,
name: hasGuardCheckRunId ? 'Merge Queue Guard' | builderName,
| import '../model/common/presubmit_check_state.dart'; | ||
| import '../model/common/presubmit_guard_conclusion.dart'; | ||
| import '../model/firestore/base.dart'; | ||
| import '../model/firestore/ci_staging.dart'; | ||
| import '../model/firestore/commit.dart' as fs; | ||
| import '../model/firestore/pr_check_runs.dart'; | ||
| import '../model/firestore/presubmit_guard.dart'; | ||
| import '../model/firestore/task.dart' as fs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused imports.
Refactor GitHub Checks Service and Luci Build Service for Unified Check Run Flow
GithubChecksServiceto use the newisTaskFailedmethod for checking task failure.taskFailedmethod fromGithubChecksService.LuciBuildServiceto support unified check run flow, including changes to method signatures and logic for scheduling builds.PresubmitUserDatato include optional fields for guard check run ID and stage.PresubmitUserDatato handle new fields.Schedulerto integrate unified check run logic, including changes to document initialization and task scheduling.Fixes: flutter/flutter#176981
Fixes: flutter/flutter#176982