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 Apr 9, 2024
2 parents 1c4c810 + 654c82c commit 1822d47
Show file tree
Hide file tree
Showing 16 changed files with 460 additions and 653 deletions.
2 changes: 1 addition & 1 deletion app_dart/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


# Dart Docker official images can be found here: https://hub.docker.com/_/dart
FROM dart:beta@sha256:e9781f16f2dbaa79bf539befe6fb7dbd65320586f45bb643a6ffb1271bd085f4
FROM dart:beta@sha256:4d3f64da52b5b7fcb96b0ea94e17c745c4ff7d6eb3d078ac3088fb16d2110f5f

WORKDIR /app

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class SchedulerRequestSubscription extends SubscriptionHandler {
try {
jsonData = jsonDecode(data) as Map<String, dynamic>;
} on FormatException {
log.info('alternate decoding method being tried.');
jsonData = json.decode(String.fromCharCodes(base64.decode(data))) as Map<String, dynamic>;
}
request = BatchRequest.fromJson(jsonData);
Expand Down
4 changes: 2 additions & 2 deletions app_dart/lib/src/service/buildbucket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ class BuildBucketClient {
url,
body: json.encode(request),
headers: <String, String>{
HttpHeaders.contentTypeHeader: 'application/json',
HttpHeaders.contentTypeHeader: 'application/json; charset=utf-8',
HttpHeaders.acceptHeader: 'application/json',
if (token != null) HttpHeaders.authorizationHeader: '${token.type} ${token.data}',
},
);

if (response.statusCode < 300) {
return responseFromJson(
json.decode(response.body.substring(kRpcResponseGarbage.length)) as Map<String, dynamic>?,
json.decode(utf8.decode(response.bodyBytes).substring(kRpcResponseGarbage.length)) as Map<String, dynamic>?,
);
}
throw BuildBucketException(response.statusCode, response.body);
Expand Down
4 changes: 3 additions & 1 deletion app_dart/lib/src/service/github_checks_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@ class GithubChecksService {
} else {
final Build buildbucketBuild =
await luciBuildService.getBuildById(buildPushMessage.build!.id, fields: 'id,builder,summaryMarkdown');
final String summary = getGithubSummary(buildbucketBuild.summaryMarkdown);
log.fine('From LUCI: ${buildbucketBuild.summaryMarkdown} after summary: $summary');
output = github.CheckRunOutput(
title: checkRun.name!,
summary: getGithubSummary(buildbucketBuild.summaryMarkdown),
);
log.fine('Updating check run with output: [$output]');
log.fine('Updating check run with output: [${output.toJson()}]');
}
}
await githubChecksUtil.updateCheckRun(
Expand Down
6 changes: 3 additions & 3 deletions app_dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies:
http: 1.2.1
json_annotation: 4.8.1
logging: 1.2.0
meta: 1.12.0
meta: 1.14.0
mime: 1.0.5
mutex: 3.1.0
neat_cache: 2.0.3
Expand All @@ -43,9 +43,9 @@ dependencies:

dev_dependencies:
analyzer: 6.4.1
build_runner: 2.4.8
build_runner: 2.4.9
fake_async: 1.3.1
flutter_lints: 3.0.1
flutter_lints: 3.0.2
json_serializable: 6.7.1
mockito: 5.4.4
platform: 3.1.4
Expand Down
13 changes: 11 additions & 2 deletions app_dart/test/service/buildbucket_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ void main() {
expect(request.headers['accept'], 'application/json');
expect(request.headers['authorization'], 'Bearer data');
if (request.method == 'POST' && request.url.toString() == 'https://localhost/$urlPrefix/$expectedPath') {
return http.Response(response, HttpStatus.accepted);
return http.Response(
response,
HttpStatus.accepted,
headers: {
HttpHeaders.contentTypeHeader: 'application/json; charset=utf-8',
},
);
}
return http.Response('Test exception: A mock response was not returned', HttpStatus.internalServerError);
});
Expand Down Expand Up @@ -216,6 +222,7 @@ void main() {

expect(build.id, '123');
expect(build.tags!.length, 3);
expect(build.summaryMarkdown, '```╔═╡ERROR #1╞```');
});

test('SearchBuilds', () async {
Expand Down Expand Up @@ -359,7 +366,9 @@ const String buildJson = '''${BuildBucketClient.kRpcResponseGarbage}
"canceledBy": null,
"startTime": "2019-08-01T11:00:00",
"endTime": null,
"status": "SCHEDULED",
"status": "SUCCESS",
"status": "FAILURE",
"summaryMarkdown": "```╔═╡ERROR #1╞```",
"input": {
"experimental": true
},
Expand Down
2 changes: 1 addition & 1 deletion auto_submit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


# Dart Docker official images can be found here: https://hub.docker.com/_/dart
FROM dart:beta@sha256:e9781f16f2dbaa79bf539befe6fb7dbd65320586f45bb643a6ffb1271bd085f4
FROM dart:beta@sha256:4d3f64da52b5b7fcb96b0ea94e17c745c4ff7d6eb3d078ac3088fb16d2110f5f

WORKDIR /app

Expand Down
6 changes: 3 additions & 3 deletions auto_submit/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies:
gql: 1.0.1-alpha+1691943394579
http: 1.2.1
json_annotation: 4.8.1
meta: 1.12.0
meta: 1.14.0
neat_cache: 2.0.3
shelf: 1.4.1
shelf_router: 1.1.4
Expand All @@ -31,9 +31,9 @@ dependencies:
mutex: 3.1.0

dev_dependencies:
build_runner: 2.4.8
build_runner: 2.4.9
json_serializable: 6.7.1
flutter_lints: 3.0.1
flutter_lints: 3.0.2
mockito: 5.4.4
test: 1.25.2

Expand Down
8 changes: 7 additions & 1 deletion cipd_packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,17 @@ Googlers can request [cipd write access](http://go/flutter-aod#available-groups)
cipd set-ref flutter/PackageName/mac-amd64 -ref Reference -version InstanceID
```

* Reference: e.g. major release versions. If not specified, `latest` will be used based on the latest package instance.
* Reference: e.g. major release versions, like `stable`, `dev`, etc. You can update/point to a newer instance with the same reference name later. If not
specified, `latest` will be used based on the latest package instance.
* InstanceID: this can be obtained from the package page, e.g. [ruby](https://chrome-infra-packages.appspot.com/p/flutter/ruby/mac-amd64/+/TyvPskvefNRkTDmiDcwRHrdL_a2FQE_4wBojOqhxdtYC).

Note: for non-Googler contributors, please file an [infra bug](https://github.com/flutter/flutter/issues/new?assignees=&labels=team-infra&projects=&template=6_infrastructure.yml) to make a reference request.

Note: if you want to define a specific version tied to a specific instance (e.g. `version: version_1_1_1`), you can use a tag instead to reference an instance.
```sh
cipd set-tag flutter/PackageName/mac-amd64 -tag Tag -version InstanceID
```

## Supporting packages download from CI recipe

Example CL: [51547 ](https://flutter-review.googlesource.com/c/recipes/+/51547)
Expand Down
4 changes: 2 additions & 2 deletions cipd_packages/codesign/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ dependencies:
crypto: 3.0.3
fake_async: 1.3.1
file: 7.0.0
flutter_lints: 3.0.1
flutter_lints: 3.0.2
logging: 1.2.0
meta: 1.12.0
meta: 1.14.0
platform: 3.1.4
process: 5.0.2
retry: 3.1.2
4 changes: 2 additions & 2 deletions cipd_packages/device_doctor/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ dependencies:
analyzer: 6.4.1
args: 2.4.2
logging: 1.2.0
meta: 1.12.0
meta: 1.14.0
path: 1.9.0
process: 5.0.2
retry: 3.1.2
yaml: 3.1.2

dev_dependencies:
build_runner: 2.4.8
build_runner: 2.4.9
fake_async: 1.3.1
mockito: 5.4.4
test: 1.25.2
4 changes: 2 additions & 2 deletions dashboard/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: 2.4.8 # Rolled by dependabot
flutter_lints: 3.0.1 # Rolled by dependabot
build_runner: 2.4.9 # Rolled by dependabot
flutter_lints: 3.0.2 # Rolled by dependabot
mockito: 5.4.4 # Remember to run ./regen_mocks.sh!
path: any # Match Flutter SDK

Expand Down
Loading

0 comments on commit 1822d47

Please sign in to comment.