Skip to content

Commit

Permalink
Merge branch 'flutter:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoamador authored Jan 8, 2024
2 parents 1059826 + dc21573 commit a27052b
Show file tree
Hide file tree
Showing 13 changed files with 217 additions and 205 deletions.
52 changes: 39 additions & 13 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,76 +8,100 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
time: "00:00" # 12 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
# Pub ecosystem.
- package-ecosystem: "pub"
directory: "/analyze"
schedule:
interval: "daily"
interval: "weekly"
time: "00:00" # 12 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
- package-ecosystem: "pub"
directory: "/app_dart"
schedule:
interval: "daily"
interval: "weekly"
time: "00:00" # 12 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
- package-ecosystem: "pub"
directory: "/auto_submit"
schedule:
interval: "daily"
interval: "weekly"
time: "00:30" # 12:30 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
- package-ecosystem: "pub"
directory: "/cipd_packages/codesign"
schedule:
interval: "daily"
interval: "weekly"
time: "00:30" # 12:30 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
- package-ecosystem: "pub"
directory: "/dashboard"
schedule:
interval: "daily"
interval: "weekly"
time: "00:30" # 12:30 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
- package-ecosystem: "pub"
directory: "/cipd_packages/device_doctor"
schedule:
interval: "daily"
interval: "weekly"
time: "01:00" # 1 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
- package-ecosystem: "pub"
directory: "/test_utilities"
schedule:
interval: "daily"
interval: "weekly"
time: "01:00" # 1 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
- package-ecosystem: "pub"
directory: "/licenses"
schedule:
interval: "daily"
interval: "weekly"
time: "01:00" # 1 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
# Docker ecosystem.
- package-ecosystem: "docker"
directory: "/app_dart"
schedule:
interval: "daily"
interval: "weekly"
time: "02:00" # 2 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
- package-ecosystem: "docker"
directory: "/auto_submit"
schedule:
interval: "daily"
interval: "weekly"
time: "02:00" # 2 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
# Go ecosystem.
- package-ecosystem: "gomod"
directory: "/tooling"
schedule:
interval: "daily"
interval: "weekly"
time: "02:00" # 2 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
allow:
Expand All @@ -86,6 +110,8 @@ updates:
- package-ecosystem: 'npm'
directory: '/gh_actions/third_party/no-response'
schedule:
interval: 'daily'
interval: "weekly"
time: "02:00" # 2 AM MTV
timezone: "America/Los_Angeles"
labels:
- "autosubmit"
2 changes: 1 addition & 1 deletion analyze/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ environment:
dependencies:
file: 7.0.0
path: 1.9.0
platform: 3.1.3
platform: 3.1.4

dev_dependencies:
mockito: 5.4.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class UpdateExistingFlakyIssue extends ApiRequestHandler<Body> {
GithubService gitHub,
RepositorySlug slug, {
required Bucket bucket,
required bool bringup,
required BuilderStatistic statistic,
required Issue existingIssue,
required CiYaml ciYaml,
Expand All @@ -97,6 +98,10 @@ class UpdateExistingFlakyIssue extends ApiRequestHandler<Body> {
final IssueUpdateBuilder updateBuilder =
IssueUpdateBuilder(statistic: statistic, threshold: _threshold, existingIssue: existingIssue, bucket: bucket);
await gitHub.createComment(slug, issueNumber: existingIssue.number, body: updateBuilder.issueUpdateComment);
// No need to bump priority and reassign if this is already marked as `bringup: true`.
if (bringup) {
return;
}
await gitHub.replaceLabelsForIssue(slug, issueNumber: existingIssue.number, labels: updateBuilder.issueLabels);
if (existingIssue.assignee == null && !updateBuilder.isBelow) {
final String testOwnerContent = await gitHub.getFileContent(
Expand Down Expand Up @@ -150,6 +155,7 @@ class UpdateExistingFlakyIssue extends ApiRequestHandler<Body> {
gitHub,
slug,
bucket: Bucket.prod,
bringup: builderFlakyMap[statistic.name]!,
statistic: statistic,
existingIssue: nameToExistingIssue[statistic.name]!,
ciYaml: ciYaml,
Expand All @@ -166,6 +172,7 @@ class UpdateExistingFlakyIssue extends ApiRequestHandler<Body> {
gitHub,
slug,
bucket: Bucket.staging,
bringup: builderFlakyMap[statistic.name]!,
statistic: statistic,
existingIssue: nameToExistingIssue[statistic.name]!,
ciYaml: ciYaml,
Expand Down
6 changes: 3 additions & 3 deletions app_dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies:
file: 7.0.0
fixnum: 1.1.0
gcloud: 0.8.11
github: 9.20.0
github: 9.22.0
googleapis: 11.4.0
googleapis_auth: 1.4.1
gql: 1.0.1-alpha+1696717343881
Expand All @@ -34,7 +34,7 @@ dependencies:
mutex: 3.1.0
neat_cache: 2.0.3
path: 1.9.0
process: 5.0.1
process: 5.0.2
process_runner: 4.2.0
protobuf: 2.1.0
retry: ^3.1.2
Expand All @@ -48,7 +48,7 @@ dev_dependencies:
flutter_lints: 3.0.1
json_serializable: 6.7.1
mockito: 5.4.4
platform: 3.1.3
platform: 3.1.4
test: 1.25.0

builders:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ void main() {
.single as Map<String, dynamic>;

// Verify comment is created correctly.
List<dynamic> captured = verify(mockIssuesService.createComment(captureAny, captureAny, captureAny)).captured;
final List<dynamic> captured =
verify(mockIssuesService.createComment(captureAny, captureAny, captureAny)).captured;
expect(captured.length, 6);
expect(captured[0].toString(), Config.flutterSlug.toString());
expect(captured[1], existingIssueNumber);
Expand All @@ -280,18 +281,14 @@ void main() {
expect(captured[4], existingIssueNumber);
expect(captured[5], expectedStagingCiyamlTestIssueComment);

// Verify labels are applied correctly.
captured = verify(
// Verify no labels are applied for already `bringup: true` target.
verifyNever(
mockGitHubClient.request(
captureAny,
captureAny,
body: captureAnyNamed('body'),
),
).captured;
expect(captured.length, 6);
expect(captured[0].toString(), 'PUT');
expect(captured[1], '/repos/${Config.flutterSlug.fullName}/issues/$existingIssueNumber/labels');
expect(captured[2], GitHubJson.encode(<String>['some random label', 'P0']));
);

expect(result['Status'], 'success');
});
Expand Down
Loading

0 comments on commit a27052b

Please sign in to comment.