Skip to content

Commit c89443c

Browse files
authored
Merge branch 'flutter:main' into main
2 parents aeda355 + cf84d83 commit c89443c

14 files changed

+113
-192
lines changed

CODEOWNERS

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,37 @@
44
# These names are just suggestions. It is fine to have your changes
55
# reviewed by someone else.
66

7-
auto_submit @ricardoamador
8-
cipd_packages/codesign/** @XilaiZhang
9-
cipd_packages/device_doctor/** @yusuf-goog
10-
cipd_packages/doxygen/** @gspencergoog
7+
## app_dart APIs
8+
app_dart/lib/src/request_handlers/check_flaky_builders.dart @keyonghan
9+
app_dart/lib/src/request_handlers/create_branch.dart @CaseyHillers
10+
app_dart/lib/src/request_handlers/dart_internal_subscription.dart @drewroengoogle
11+
app_dart/lib/src/request_handlers/file_flaky_issue_and_pr.dart @keyonghan
12+
app_dart/lib/src/request_handlers/flush_cache.dart @keyonghan
13+
app_dart/lib/src/request_handlers/get_build_status.dart @keyonghan
14+
app_dart/lib/src/request_handlers/get_release_branches.dart @CaseyHillers
15+
app_dart/lib/src/request_handlers/get_repos.dart @keyonghan
16+
app_dart/lib/src/request_handlers/get_status.dart @keyonghan
17+
app_dart/lib/src/request_handlers/get_green_commits.dart @XilaiZhang
18+
app_dart/lib/src/request_handlers/github_rate_limit_status.dart @keyonghan
19+
app_dart/lib/src/request_handlers/github_webhook.dart @keyonghan
20+
app_dart/lib/src/request_handlers/github/webhook_subscription.dart @keyonghan
21+
app_dart/lib/src/request_handlers/presubmit_luci_subscription.dart @keyonghan
22+
app_dart/lib/src/request_handlers/postsubmit_luci_subscription.dart @keyonghan
23+
app_dart/lib/src/request_handlers/push_build_status_to_github.dart @keyonghan
24+
app_dart/lib/src/request_handlers/push_gold_status_to_github.dart @Piinks
25+
app_dart/lib/src/request_handlers/reset_prod_task.dart @keyonghan
26+
app_dart/lib/src/request_handlers/reset_try_task.dart @keyonghan
27+
app_dart/lib/src/request_handlers/scheduler/batch_backfiller.dart @keyonghan
28+
app_dart/lib/src/request_handlers/scheduler/request_subscription.dart @keyonghan
29+
app_dart/lib/src/request_handlers/scheduler/vacuum_stale_tasks.dart @keyonghan
30+
app_dart/lib/src/request_handlers/update_existing_flaky_issues.dart @keyonghan
31+
app_dart/lib/src/request_handlers/update_task_status.dart @keyonghan
32+
app_dart/lib/src/request_handlers/vacuum_github_commits.dart @keyonghan
33+
34+
## auto_submit app
35+
auto_submit @ricardoamador
36+
37+
## cipd packages
38+
cipd_packages/codesign/** @XilaiZhang
39+
cipd_packages/device_doctor/** @yusuf-goog
40+
cipd_packages/doxygen/** @gspencergoog

app_dart/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
# Dart Docker official images can be found here: https://hub.docker.com/_/dart
7-
FROM dart:beta@sha256:581ddbe030111ce2d564c94a8a8a73ce29291d3b8305316ffa4d849d6c35395f
7+
FROM dart:beta@sha256:f07d175c1d56a41b61d6ed099a6a79221ddc747eeccdbecd1e59dd324a371142
88

99
WORKDIR /app
1010

app_dart/bin/server.dart

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ Future<void> main() async {
8282
authenticationProvider: authProvider,
8383
cache: cache,
8484
),
85-
'/api/get-authentication-status': GetAuthenticationStatus(
86-
config: config,
87-
authenticationProvider: authProvider,
88-
),
8985
'/api/github-webhook-pullrequest': GithubWebhook(
9086
config: config,
9187
pubsub: const PubSub(),
@@ -107,13 +103,6 @@ Future<void> main() async {
107103
scheduler: scheduler,
108104
commitService: commitService,
109105
),
110-
111-
/// API to run authenticated graphql queries. It requires to pass the graphql query as the body
112-
/// of a POST request.
113-
'/api/query-github-graphql': QueryGithubGraphql(
114-
config: config,
115-
authenticationProvider: authProvider,
116-
),
117106
'/api/presubmit-luci-subscription': PresubmitLuciSubscription(
118107
cache: cache,
119108
config: config,

app_dart/lib/cocoon_service.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export 'src/request_handlers/create_branch.dart';
99
export 'src/request_handlers/dart_internal_subscription.dart';
1010
export 'src/request_handlers/file_flaky_issue_and_pr.dart';
1111
export 'src/request_handlers/flush_cache.dart';
12-
export 'src/request_handlers/get_authentication_status.dart';
1312
export 'src/request_handlers/get_build_status.dart';
1413
export 'src/request_handlers/get_release_branches.dart';
1514
export 'src/request_handlers/get_repos.dart';
@@ -22,7 +21,6 @@ export 'src/request_handlers/postsubmit_luci_subscription.dart';
2221
export 'src/request_handlers/presubmit_luci_subscription.dart';
2322
export 'src/request_handlers/push_build_status_to_github.dart';
2423
export 'src/request_handlers/push_gold_status_to_github.dart';
25-
export 'src/request_handlers/query_github_graphql.dart';
2624
export 'src/request_handlers/readiness_check.dart';
2725
export 'src/request_handlers/reset_prod_task.dart';
2826
export 'src/request_handlers/reset_try_task.dart';

app_dart/lib/src/request_handlers/get_authentication_status.dart

Lines changed: 0 additions & 32 deletions
This file was deleted.

app_dart/lib/src/request_handlers/presubmit_luci_subscription.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ class PresubmitLuciSubscription extends SubscriptionHandler {
119119
} else {
120120
ciYaml = await scheduler.getCiYaml(commit);
121121
}
122+
123+
// Do not block on the target not found.
124+
if (!ciYaml.presubmitTargets.any((element) => element.value.name == builderName)) {
125+
// do not reschedule
126+
log.warning('Did not find builder with name: $builderName in ciYaml for ${commit.sha}');
127+
final List<String> availableBuilderList = ciYaml.presubmitTargets.map((Target e) => e.value.name).toList();
128+
log.warning('ciYaml presubmit targets found: $availableBuilderList');
129+
return 1;
130+
}
131+
122132
final Target target = ciYaml.presubmitTargets.where((element) => element.value.name == builderName).single;
123133
final Map<String, Object> properties = target.getProperties();
124134
if (!properties.containsKey('presubmit_max_attempts')) {

app_dart/lib/src/request_handlers/query_github_graphql.dart

Lines changed: 0 additions & 56 deletions
This file was deleted.

app_dart/test/request_handlers/presubmit_luci_subscription_test.dart

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,29 @@ void main() {
158158
);
159159
verify(mockGithubChecksService.updateCheckStatus(any, any, any, rescheduled: true)).called(1);
160160
});
161+
162+
test('Build not rescheduled if not found in ciYaml list.', () async {
163+
when(mockGithubChecksService.updateCheckStatus(any, any, any, rescheduled: false)).thenAnswer((_) async => true);
164+
when(mockGithubChecksService.taskFailed(any)).thenAnswer((_) => true);
165+
when(mockGithubChecksService.currentAttempt(any)).thenAnswer((_) => 1);
166+
tester.message = createBuildbucketPushMessage(
167+
'COMPLETED',
168+
result: 'SUCCESS',
169+
// This builder will not be present.
170+
builderName: 'Linux C',
171+
userData: '{\\"repo_owner\\": \\"flutter\\",'
172+
'\\"commit_branch\\": \\"main\\",'
173+
'\\"commit_sha\\": \\"abc\\",'
174+
'\\"repo_name\\": \\"flutter\\"}',
175+
);
176+
await tester.post(handler);
177+
verifyNever(
178+
mockLuciBuildService.rescheduleBuild(
179+
builderName: 'Linux C',
180+
buildPushMessage: BuildPushMessage.fromPushMessage(tester.message),
181+
rescheduleAttempt: 1,
182+
),
183+
);
184+
verify(mockGithubChecksService.updateCheckStatus(any, any, any, rescheduled: false)).called(1);
185+
});
161186
}

app_dart/test/request_handlers/query_github_graphql_test.dart

Lines changed: 0 additions & 72 deletions
This file was deleted.

auto_submit/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
# Dart Docker official images can be found here: https://hub.docker.com/_/dart
7-
FROM dart:beta@sha256:581ddbe030111ce2d564c94a8a8a73ce29291d3b8305316ffa4d849d6c35395f
7+
FROM dart:beta@sha256:f07d175c1d56a41b61d6ed099a6a79221ddc747eeccdbecd1e59dd324a371142
88

99
WORKDIR /app
1010

0 commit comments

Comments
 (0)