Pass the osx_version to the flutter drone.
The main recipe is the one receiving the osx_version and was not being
passed to the flutter_drone which is the one ultimately running the
build/tests.
Change-Id: I021c3f65271fa60c5419e813044f27e8e0f86683
Bug: https://github.com/flutter/flutter/issues/65223
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/6361
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
Reviewed-by: Tong Wu <wutong@google.com>
diff --git a/recipe_modules/shard_util/api.py b/recipe_modules/shard_util/api.py
index 1201c13..0b4b512 100644
--- a/recipe_modules/shard_util/api.py
+++ b/recipe_modules/shard_util/api.py
@@ -39,6 +39,12 @@
drone_props['git_url'] = self.m.properties.get('git_url')
if self.m.properties.get('git_ref'):
drone_props['git_ref'] = self.m.properties.get('git_ref')
+ if self.m.properties.get('$depot_tools/osx_sdk'):
+ drone_props['$depot_tools/osx_sdk'] = {
+ "sdk_version":
+ self.m.properties.get('$depot_tools/osx_sdk'
+ ).get('sdk_version')
+ }
platform_name = PLATFORM_TO_NAME.get(self.m.platform.name)
req = self.m.buildbucket.schedule_request(
swarming_parent_run_id=self.m.swarming.task_id,
diff --git a/recipe_modules/shard_util/examples/full.expected/presubmit.json b/recipe_modules/shard_util/examples/full.expected/presubmit.json
index bfecd71..9b9d84a 100644
--- a/recipe_modules/shard_util/examples/full.expected/presubmit.json
+++ b/recipe_modules/shard_util/examples/full.expected/presubmit.json
@@ -8,7 +8,7 @@
],
"infra_step": true,
"name": "buildbucket.schedule",
- "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux SDK Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"android_sdk_license\": \"\", \"android_sdk_preview_license\": \"\", \"dependencies\": [{\"dependency\": \"android_sdk\"}, {\"dependency\": \"chrome_and_driver\"}], \"git_ref\": \"abc\", \"git_url\": \"https://abc\", \"shard\": \"\", \"subshard\": \"0\", \"task_name\": \"-0\"}, \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}, {\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux SDK Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"android_sdk_license\": \"\", \"android_sdk_preview_license\": \"\", \"dependencies\": [{\"dependency\": \"android_sdk\"}, {\"dependency\": \"chrome_and_driver\"}], \"git_ref\": \"abc\", \"git_url\": \"https://abc\", \"shard\": \"\", \"subshard\": \"1_last\", \"task_name\": \"-1_last\"}, \"requestId\": \"0-00000000-0000-0000-0000-00000000133a\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
+ "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux SDK Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"$depot_tools/osx_sdk\": {\"sdk_version\": \"11a420a\"}, \"android_sdk_license\": \"\", \"android_sdk_preview_license\": \"\", \"dependencies\": [{\"dependency\": \"android_sdk\"}, {\"dependency\": \"chrome_and_driver\"}], \"git_ref\": \"abc\", \"git_url\": \"https://abc\", \"shard\": \"\", \"subshard\": \"0\", \"task_name\": \"-0\"}, \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}, {\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux SDK Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"$depot_tools/osx_sdk\": {\"sdk_version\": \"11a420a\"}, \"android_sdk_license\": \"\", \"android_sdk_preview_license\": \"\", \"dependencies\": [{\"dependency\": \"android_sdk\"}, {\"dependency\": \"chrome_and_driver\"}], \"git_ref\": \"abc\", \"git_url\": \"https://abc\", \"shard\": \"\", \"subshard\": \"1_last\", \"task_name\": \"-1_last\"}, \"requestId\": \"0-00000000-0000-0000-0000-00000000133a\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
"~followup_annotations": [
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"responses\": [@@@",
@@ -42,6 +42,9 @@
"@@@STEP_LOG_LINE@request@ \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", @@@",
"@@@STEP_LOG_LINE@request@ \"priority\": 25, @@@",
"@@@STEP_LOG_LINE@request@ \"properties\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"$depot_tools/osx_sdk\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"sdk_version\": \"11a420a\"@@@",
+ "@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"android_sdk_license\": \"\", @@@",
"@@@STEP_LOG_LINE@request@ \"android_sdk_preview_license\": \"\", @@@",
"@@@STEP_LOG_LINE@request@ \"dependencies\": [@@@",
@@ -79,6 +82,9 @@
"@@@STEP_LOG_LINE@request@ \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", @@@",
"@@@STEP_LOG_LINE@request@ \"priority\": 25, @@@",
"@@@STEP_LOG_LINE@request@ \"properties\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"$depot_tools/osx_sdk\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"sdk_version\": \"11a420a\"@@@",
+ "@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"android_sdk_license\": \"\", @@@",
"@@@STEP_LOG_LINE@request@ \"android_sdk_preview_license\": \"\", @@@",
"@@@STEP_LOG_LINE@request@ \"dependencies\": [@@@",
diff --git a/recipe_modules/shard_util/examples/full.py b/recipe_modules/shard_util/examples/full.py
index 3d2fcb2..7836585 100644
--- a/recipe_modules/shard_util/examples/full.py
+++ b/recipe_modules/shard_util/examples/full.py
@@ -21,13 +21,12 @@
'postsubmit', api.properties(subshards=['0', '1_last']),
api.platform.name('win')
)
+ props = {
+ 'subshards': ['0', '1_last'], 'git_url': 'https://abc', 'git_ref': 'abc',
+ 'dependencies': [{"dependency": "android_sdk"},
+ {"dependency": "chrome_and_driver"}],
+ '$depot_tools/osx_sdk': {"sdk_version": "11a420a"}
+ }
yield api.test(
- 'presubmit',
- api.properties(
- subshards=['0', '1_last'],
- git_url='https://abc',
- git_ref='abc',
- dependencies=[{"dependency": "android_sdk"},
- {"dependency": "chrome_and_driver"}]
- ), api.platform.name('linux')
+ 'presubmit', api.properties(**props), api.platform.name('linux')
)