Skip to content

Commit

Permalink
[scheduler] Add recipe property to support releases (flutter#3305)
Browse files Browse the repository at this point in the history
  • Loading branch information
Casey Hillers authored Dec 1, 2023
1 parent 30db510 commit 8517373
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app_dart/lib/src/model/ci_yaml/target.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ class Target {
}

Map<String, Object> _getTargetProperties() {
final Map<String, Object> properties = <String, Object>{};
final Map<String, Object> properties = <String, Object>{
'recipe': value.recipe,
};
for (String key in value.properties.keys) {
properties[key] = _parseProperty(key, value.properties[key]!);
}
Expand Down
2 changes: 2 additions & 0 deletions app_dart/test/model/ci_yaml/target_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ void main() {
expect(target.getProperties(), <String, Object>{
'bringup': false,
'dependencies': <String>[],
'recipe': 'devicelab/devicelab',
});
});

Expand Down Expand Up @@ -91,6 +92,7 @@ void main() {
'runtime_versions': ['ios-13-0', 'ios-15-0'],
'sdk_version': '14e222b',
},
'recipe': 'devicelab/devicelab',
});
});

Expand Down
4 changes: 4 additions & 0 deletions app_dart/test/service/luci_build_service_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ void main() {
'git_url': 'https://github.com/flutter/flutter',
'git_ref': 'refs/pull/123/head',
'exe_cipd_version': 'refs/heads/main',
'recipe': 'devicelab/devicelab',
});
expect(dimensions.length, 1);
expect(dimensions[0].key, 'os');
Expand Down Expand Up @@ -391,6 +392,7 @@ void main() {
'git_url': 'https://github.com/flutter/flutter',
'git_ref': 'refs/pull/123/head',
'exe_cipd_version': 'refs/heads/main',
'recipe': 'devicelab/devicelab',
LuciBuildService.propertiesGithubBuildLabelName: [
'${LuciBuildService.githubBuildLabelPrefix}hello',
'${LuciBuildService.githubBuildLabelPrefix}world',
Expand Down Expand Up @@ -439,6 +441,7 @@ void main() {
generateTarget(
1,
properties: <String, String>{
'recipe': 'devicelab/devicelab',
'os': 'debian-10.12',
},
slug: Config.packagesSlug,
Expand Down Expand Up @@ -479,6 +482,7 @@ void main() {
'git_branch': 'master',
'exe_cipd_version': 'refs/heads/master',
'os': 'debian-10.12',
'recipe': 'devicelab/devicelab',
});
expect(scheduleBuild.exe, <String, String>{
'cipdVersion': 'refs/heads/master',
Expand Down
2 changes: 2 additions & 0 deletions app_dart/test/src/utilities/entity_generators.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Target generateTarget(
bool? bringup,
github.RepositorySlug? slug,
pb.SchedulerSystem? schedulerSystem,
String recipe = 'devicelab/devicelab',
}) {
final pb.SchedulerConfig config = schedulerConfig ?? exampleConfig.config;
if (platformProperties != null && platformDimensions != null) {
Expand All @@ -129,6 +130,7 @@ Target generateTarget(
runIf: runIf ?? <String>[],
runIfNot: runIfNot ?? <String>[],
bringup: bringup ?? false,
recipe: recipe,
scheduler: schedulerSystem ?? pb.SchedulerSystem.cocoon,
),
);
Expand Down

0 comments on commit 8517373

Please sign in to comment.