Reland "Migrate device_lab_test recipes to shard_util v2."
This is part of the cleanup required to support release_candidate
branches of recipes in a single place.
Bug: https://github.com/flutter/flutter/issues/114943
Change-Id: I2d28c84ed2f85cfa75565c1b0c5c171853f7e607
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/36181
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
Reviewed-by: Keyong Han <keyonghan@google.com>
diff --git a/recipe_modules/shard_util_v2/api.py b/recipe_modules/shard_util_v2/api.py
index 7b63b1f..61f566e 100644
--- a/recipe_modules/shard_util_v2/api.py
+++ b/recipe_modules/shard_util_v2/api.py
@@ -166,9 +166,9 @@
platform_name = build.get('platform') or PLATFORM_TO_NAME.get(
self.m.platform.name
)
- for d in drone_dimensions:
- k, v = d.split('=')
- task_dimensions.append(common_pb2.RequestedDimension(key=k, value=v))
+ #for d in drone_dimensions:
+ # k, v = d.split('=')
+ # task_dimensions.append(common_pb2.RequestedDimension(key=k, value=v))
# Override recipe.
drone_properties['recipe'] = recipe_name
diff --git a/recipes/devicelab/devicelab_drone_build_test.expected/artifact does not exist.json b/recipes/devicelab/devicelab_drone_build_test.expected/artifact does not exist.json
index 3c10a31..c76695e 100644
--- a/recipes/devicelab/devicelab_drone_build_test.expected/artifact does not exist.json
+++ b/recipes/devicelab/devicelab_drone_build_test.expected/artifact does not exist.json
@@ -11,7 +11,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -32,12 +32,12 @@
"RECIPE_REPO[depot_tools]/gsutil.py",
"----",
"ls",
- "gs://flutter_devicelab/flutter/ci/2d72510e447ab60a9728aeea2362d8be2cbd7789/def"
+ "gs://flutter_devicelab/flutter/prod/2d72510e447ab60a9728aeea2362d8be2cbd7789/def"
],
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -65,7 +65,7 @@
],
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -97,7 +97,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -123,7 +123,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -148,7 +148,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -177,7 +177,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -202,7 +202,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -229,7 +229,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -254,7 +254,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -285,7 +285,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -323,7 +323,7 @@
},
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -363,7 +363,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -403,7 +403,7 @@
},
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -454,7 +454,7 @@
},
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -485,7 +485,7 @@
"cp",
"-r",
"[CLEANUP]/tmp_tmp_2/*",
- "gs://flutter_devicelab/flutter/ci/2d72510e447ab60a9728aeea2362d8be2cbd7789/def"
+ "gs://flutter_devicelab/flutter/prod/2d72510e447ab60a9728aeea2362d8be2cbd7789/def"
],
"cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
"env": {
@@ -510,7 +510,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -522,7 +522,7 @@
},
"name": "gsutil upload artifacts",
"~followup_annotations": [
- "@@@STEP_LINK@artifacts@https://console.cloud.google.com/storage/browser/flutter_devicelab/flutter/ci/2d72510e447ab60a9728aeea2362d8be2cbd7789/def@@@"
+ "@@@STEP_LINK@artifacts@https://console.cloud.google.com/storage/browser/flutter_devicelab/flutter/prod/2d72510e447ab60a9728aeea2362d8be2cbd7789/def@@@"
]
},
{
@@ -557,7 +557,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -600,7 +600,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -643,7 +643,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -686,7 +686,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -729,7 +729,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -776,7 +776,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -789,6 +789,10 @@
"name": "OS info (2)"
},
{
+ "cmd": [],
+ "name": "launch builds"
+ },
+ {
"cmd": [
"bb",
"batch",
@@ -798,7 +802,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -808,16 +812,17 @@
"hostname": "rdbhost"
}
},
- "name": "buildbucket.schedule",
- "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"ci\", \"builder\": \"Linux Devicelab Test Drone\", \"project\": \"test\"}, \"exe\": {\"cipdVersion\": \"refs/heads/master\"}, \"experimental\": \"NO\", \"experiments\": {\"luci.buildbucket.parent_tracking\": false}, \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"git.example.com\", \"id\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\", \"project\": \"test/repo\", \"ref\": \"refs/heads/main\"}, \"priority\": 25, \"properties\": {\"artifact\": \"def\", \"dependencies\": [], \"git_branch\": \"master\", \"parent_builder\": \"Linux abc\", \"tags\": [], \"task_name\": \"abc\"}, \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"parent_buildbucket_id\", \"value\": \"8945511751514863184\"}, {\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
+ "name": "launch builds.schedule",
+ "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"prod\", \"builder\": \"Linux Production Engine Drone\", \"project\": \"test\"}, \"exe\": {\"cipdVersion\": \"refs/heads/main\"}, \"experimental\": \"NO\", \"experiments\": {\"luci.buildbucket.parent_tracking\": false}, \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"git.example.com\", \"id\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\", \"project\": \"test/repo\", \"ref\": \"refs/heads/main\"}, \"priority\": 25, \"properties\": {\"artifact\": \"def\", \"build\": {\"drone_dimensions\": [], \"name\": \"abc\", \"properties\": {\"artifact\": \"def\", \"dependencies\": [], \"git_branch\": \"master\", \"parent_builder\": \"Linux abc\", \"tags\": [], \"task_name\": \"abc\"}}, \"dependencies\": [], \"git_branch\": \"master\", \"git_ref\": \"refs/pull/1/head\", \"parent_builder\": \"Linux abc\", \"recipe\": \"devicelab/devicelab_test_drone\", \"tags\": [], \"task_name\": \"abc\"}, \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"parent_buildbucket_id\", \"value\": \"8945511751514863184\"}, {\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
"~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"responses\": [@@@",
"@@@STEP_LOG_LINE@json.output@ {@@@",
"@@@STEP_LOG_LINE@json.output@ \"scheduleBuild\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"builder\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"bucket\": \"ci\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"builder\": \"Linux Devicelab Test Drone\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"bucket\": \"prod\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"builder\": \"Linux Production Engine Drone\", @@@",
"@@@STEP_LOG_LINE@json.output@ \"project\": \"test\"@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"id\": \"8922054662172514000\"@@@",
@@ -831,12 +836,12 @@
"@@@STEP_LOG_LINE@request@ {@@@",
"@@@STEP_LOG_LINE@request@ \"scheduleBuild\": {@@@",
"@@@STEP_LOG_LINE@request@ \"builder\": {@@@",
- "@@@STEP_LOG_LINE@request@ \"bucket\": \"ci\", @@@",
- "@@@STEP_LOG_LINE@request@ \"builder\": \"Linux Devicelab Test Drone\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"bucket\": \"prod\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"builder\": \"Linux Production Engine Drone\", @@@",
"@@@STEP_LOG_LINE@request@ \"project\": \"test\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"exe\": {@@@",
- "@@@STEP_LOG_LINE@request@ \"cipdVersion\": \"refs/heads/master\"@@@",
+ "@@@STEP_LOG_LINE@request@ \"cipdVersion\": \"refs/heads/main\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"experimental\": \"NO\", @@@",
"@@@STEP_LOG_LINE@request@ \"experiments\": {@@@",
@@ -852,9 +857,23 @@
"@@@STEP_LOG_LINE@request@ \"priority\": 25, @@@",
"@@@STEP_LOG_LINE@request@ \"properties\": {@@@",
"@@@STEP_LOG_LINE@request@ \"artifact\": \"def\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"build\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"drone_dimensions\": [], @@@",
+ "@@@STEP_LOG_LINE@request@ \"name\": \"abc\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"properties\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"artifact\": \"def\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"dependencies\": [], @@@",
+ "@@@STEP_LOG_LINE@request@ \"git_branch\": \"master\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"parent_builder\": \"Linux abc\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"tags\": [], @@@",
+ "@@@STEP_LOG_LINE@request@ \"task_name\": \"abc\"@@@",
+ "@@@STEP_LOG_LINE@request@ }@@@",
+ "@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"dependencies\": [], @@@",
"@@@STEP_LOG_LINE@request@ \"git_branch\": \"master\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"git_ref\": \"refs/pull/1/head\", @@@",
"@@@STEP_LOG_LINE@request@ \"parent_builder\": \"Linux abc\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"recipe\": \"devicelab/devicelab_test_drone\", @@@",
"@@@STEP_LOG_LINE@request@ \"tags\": [], @@@",
"@@@STEP_LOG_LINE@request@ \"task_name\": \"abc\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
@@ -882,14 +901,14 @@
},
{
"cmd": [],
- "name": "Task Shards",
- "~followup_annotations": [
- "@@@STEP_LINK@@https://cr-buildbucket.appspot.com/build/8922054662172514000@@@"
- ]
+ "name": "collect builds"
},
{
"cmd": [],
- "name": "buildbucket.collect"
+ "name": "collect builds.collect",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"cmd": [
@@ -898,13 +917,13 @@
"-host",
"cr-buildbucket.appspot.com",
"-interval",
- "60s",
+ "20s",
"8922054662172514000"
],
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -914,10 +933,10 @@
"hostname": "rdbhost"
}
},
- "name": "buildbucket.collect.wait",
- "timeout": 10800,
+ "name": "collect builds.collect.wait",
+ "timeout": 86400,
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_NEST_LEVEL@2@@@"
]
},
{
@@ -930,7 +949,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -940,10 +959,10 @@
"hostname": "rdbhost"
}
},
- "name": "buildbucket.collect.get",
- "stdin": "{\"requests\": [{\"getBuild\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,summaryMarkdown,updateTime\", \"id\": \"8922054662172514000\"}}]}",
+ "name": "collect builds.collect.get",
+ "stdin": "{\"requests\": [{\"getBuild\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,infra.swarming.taskId,input,number,output,startTime,status,summaryMarkdown,updateTime\", \"id\": \"8922054662172514000\"}}]}",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_NEST_LEVEL@2@@@",
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"responses\": [@@@",
"@@@STEP_LOG_LINE@json.output@ {@@@",
@@ -959,7 +978,7 @@
"@@@STEP_LOG_LINE@request@ \"requests\": [@@@",
"@@@STEP_LOG_LINE@request@ {@@@",
"@@@STEP_LOG_LINE@request@ \"getBuild\": {@@@",
- "@@@STEP_LOG_LINE@request@ \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,summaryMarkdown,updateTime\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,infra.swarming.taskId,input,number,output,startTime,status,summaryMarkdown,updateTime\", @@@",
"@@@STEP_LOG_LINE@request@ \"id\": \"8922054662172514000\"@@@",
"@@@STEP_LOG_LINE@request@ }@@@",
"@@@STEP_LOG_LINE@request@ }@@@",
@@ -971,13 +990,16 @@
},
{
"cmd": [],
- "name": "display builds"
+ "name": "collect builds.display builds",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"cmd": [],
- "name": "display builds.",
+ "name": "collect builds.display builds.abc",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_NEST_LEVEL@2@@@",
"@@@STEP_LINK@8922054662172514000@https://cr-buildbucket.appspot.com/build/8922054662172514000@@@"
]
},
diff --git a/recipes/devicelab/devicelab_drone_build_test.expected/artifact exists.json b/recipes/devicelab/devicelab_drone_build_test.expected/artifact exists.json
index 2492bb3..47e1fbc 100644
--- a/recipes/devicelab/devicelab_drone_build_test.expected/artifact exists.json
+++ b/recipes/devicelab/devicelab_drone_build_test.expected/artifact exists.json
@@ -9,6 +9,18 @@
"%MEM"
],
"infra_step": true,
+ "luci_context": {
+ "realm": {
+ "name": "test:prod"
+ },
+ "resultdb": {
+ "current_invocation": {
+ "name": "invocations/build:8945511751514863184",
+ "update_token": "token"
+ },
+ "hostname": "rdbhost"
+ }
+ },
"name": "OS info"
},
{
@@ -20,12 +32,28 @@
"RECIPE_REPO[depot_tools]/gsutil.py",
"----",
"ls",
- "gs://flutter_devicelab/flutter//refs/pull/1/head/def"
+ "gs://flutter_devicelab/flutter/prod/2d72510e447ab60a9728aeea2362d8be2cbd7789/def"
],
"infra_step": true,
+ "luci_context": {
+ "realm": {
+ "name": "test:prod"
+ },
+ "resultdb": {
+ "current_invocation": {
+ "name": "invocations/build:8945511751514863184",
+ "update_token": "token"
+ },
+ "hostname": "rdbhost"
+ }
+ },
"name": "gsutil list"
},
{
+ "cmd": [],
+ "name": "launch builds"
+ },
+ {
"cmd": [
"bb",
"batch",
@@ -33,15 +61,30 @@
"cr-buildbucket.appspot.com"
],
"infra_step": true,
- "name": "buildbucket.schedule",
- "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux Devicelab Test Drone\"}, \"exe\": {\"cipdVersion\": \"refs/heads/master\"}, \"experimental\": \"NO\", \"experiments\": {\"luci.buildbucket.parent_tracking\": false}, \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"artifact\": \"def\", \"dependencies\": [], \"git_branch\": \"master\", \"git_ref\": \"refs/pull/1/head\", \"git_url\": \"test/repo\", \"parent_builder\": \"Linux abc\", \"tags\": [], \"task_name\": \"abc\"}, \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"parent_buildbucket_id\", \"value\": \"0\"}, {\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
+ "luci_context": {
+ "realm": {
+ "name": "test:prod"
+ },
+ "resultdb": {
+ "current_invocation": {
+ "name": "invocations/build:8945511751514863184",
+ "update_token": "token"
+ },
+ "hostname": "rdbhost"
+ }
+ },
+ "name": "launch builds.schedule",
+ "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"prod\", \"builder\": \"Linux Production Engine Drone\", \"project\": \"test\"}, \"exe\": {\"cipdVersion\": \"refs/heads/main\"}, \"experimental\": \"NO\", \"experiments\": {\"luci.buildbucket.parent_tracking\": false}, \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"git.example.com\", \"id\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\", \"project\": \"test/repo\", \"ref\": \"refs/heads/master\"}, \"priority\": 25, \"properties\": {\"artifact\": \"def\", \"build\": {\"drone_dimensions\": [], \"name\": \"abc\", \"properties\": {\"artifact\": \"def\", \"dependencies\": [], \"git_branch\": \"master\", \"parent_builder\": \"Linux abc\", \"tags\": [], \"task_name\": \"abc\"}}, \"dependencies\": [], \"git_branch\": \"master\", \"git_ref\": \"refs/pull/1/head\", \"git_url\": \"test/repo\", \"parent_builder\": \"Linux abc\", \"recipe\": \"devicelab/devicelab_test_drone\", \"tags\": [], \"task_name\": \"abc\"}, \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"parent_buildbucket_id\", \"value\": \"8945511751514863184\"}, {\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
"~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"responses\": [@@@",
"@@@STEP_LOG_LINE@json.output@ {@@@",
"@@@STEP_LOG_LINE@json.output@ \"scheduleBuild\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"builder\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"builder\": \"Linux Devicelab Test Drone\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"bucket\": \"prod\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"builder\": \"Linux Production Engine Drone\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"project\": \"test\"@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"id\": \"8922054662172514000\"@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
@@ -54,35 +97,56 @@
"@@@STEP_LOG_LINE@request@ {@@@",
"@@@STEP_LOG_LINE@request@ \"scheduleBuild\": {@@@",
"@@@STEP_LOG_LINE@request@ \"builder\": {@@@",
- "@@@STEP_LOG_LINE@request@ \"builder\": \"Linux Devicelab Test Drone\"@@@",
+ "@@@STEP_LOG_LINE@request@ \"bucket\": \"prod\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"builder\": \"Linux Production Engine Drone\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"project\": \"test\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"exe\": {@@@",
- "@@@STEP_LOG_LINE@request@ \"cipdVersion\": \"refs/heads/master\"@@@",
+ "@@@STEP_LOG_LINE@request@ \"cipdVersion\": \"refs/heads/main\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"experimental\": \"NO\", @@@",
"@@@STEP_LOG_LINE@request@ \"experiments\": {@@@",
"@@@STEP_LOG_LINE@request@ \"luci.buildbucket.parent_tracking\": false@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"gitilesCommit\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"host\": \"git.example.com\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"id\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"project\": \"test/repo\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"ref\": \"refs/heads/master\"@@@",
+ "@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"priority\": 25, @@@",
"@@@STEP_LOG_LINE@request@ \"properties\": {@@@",
"@@@STEP_LOG_LINE@request@ \"artifact\": \"def\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"build\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"drone_dimensions\": [], @@@",
+ "@@@STEP_LOG_LINE@request@ \"name\": \"abc\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"properties\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"artifact\": \"def\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"dependencies\": [], @@@",
+ "@@@STEP_LOG_LINE@request@ \"git_branch\": \"master\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"parent_builder\": \"Linux abc\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"tags\": [], @@@",
+ "@@@STEP_LOG_LINE@request@ \"task_name\": \"abc\"@@@",
+ "@@@STEP_LOG_LINE@request@ }@@@",
+ "@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"dependencies\": [], @@@",
"@@@STEP_LOG_LINE@request@ \"git_branch\": \"master\", @@@",
"@@@STEP_LOG_LINE@request@ \"git_ref\": \"refs/pull/1/head\", @@@",
"@@@STEP_LOG_LINE@request@ \"git_url\": \"test/repo\", @@@",
"@@@STEP_LOG_LINE@request@ \"parent_builder\": \"Linux abc\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"recipe\": \"devicelab/devicelab_test_drone\", @@@",
"@@@STEP_LOG_LINE@request@ \"tags\": [], @@@",
"@@@STEP_LOG_LINE@request@ \"task_name\": \"abc\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
- "@@@STEP_LOG_LINE@request@ \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-000000001337\", @@@",
"@@@STEP_LOG_LINE@request@ \"swarming\": {@@@",
"@@@STEP_LOG_LINE@request@ \"parentRunId\": \"fake-task-id\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"tags\": [@@@",
"@@@STEP_LOG_LINE@request@ {@@@",
"@@@STEP_LOG_LINE@request@ \"key\": \"parent_buildbucket_id\", @@@",
- "@@@STEP_LOG_LINE@request@ \"value\": \"0\"@@@",
+ "@@@STEP_LOG_LINE@request@ \"value\": \"8945511751514863184\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ {@@@",
"@@@STEP_LOG_LINE@request@ \"key\": \"user_agent\", @@@",
@@ -99,14 +163,14 @@
},
{
"cmd": [],
- "name": "Task Shards",
- "~followup_annotations": [
- "@@@STEP_LINK@@https://cr-buildbucket.appspot.com/build/8922054662172514000@@@"
- ]
+ "name": "collect builds"
},
{
"cmd": [],
- "name": "buildbucket.collect"
+ "name": "collect builds.collect",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"cmd": [
@@ -115,14 +179,26 @@
"-host",
"cr-buildbucket.appspot.com",
"-interval",
- "60s",
+ "20s",
"8922054662172514000"
],
"infra_step": true,
- "name": "buildbucket.collect.wait",
- "timeout": 10800,
+ "luci_context": {
+ "realm": {
+ "name": "test:prod"
+ },
+ "resultdb": {
+ "current_invocation": {
+ "name": "invocations/build:8945511751514863184",
+ "update_token": "token"
+ },
+ "hostname": "rdbhost"
+ }
+ },
+ "name": "collect builds.collect.wait",
+ "timeout": 86400,
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_NEST_LEVEL@2@@@"
]
},
{
@@ -133,10 +209,22 @@
"cr-buildbucket.appspot.com"
],
"infra_step": true,
- "name": "buildbucket.collect.get",
- "stdin": "{\"requests\": [{\"getBuild\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,summaryMarkdown,updateTime\", \"id\": \"8922054662172514000\"}}]}",
+ "luci_context": {
+ "realm": {
+ "name": "test:prod"
+ },
+ "resultdb": {
+ "current_invocation": {
+ "name": "invocations/build:8945511751514863184",
+ "update_token": "token"
+ },
+ "hostname": "rdbhost"
+ }
+ },
+ "name": "collect builds.collect.get",
+ "stdin": "{\"requests\": [{\"getBuild\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,infra.swarming.taskId,input,number,output,startTime,status,summaryMarkdown,updateTime\", \"id\": \"8922054662172514000\"}}]}",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_NEST_LEVEL@2@@@",
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"responses\": [@@@",
"@@@STEP_LOG_LINE@json.output@ {@@@",
@@ -152,7 +240,7 @@
"@@@STEP_LOG_LINE@request@ \"requests\": [@@@",
"@@@STEP_LOG_LINE@request@ {@@@",
"@@@STEP_LOG_LINE@request@ \"getBuild\": {@@@",
- "@@@STEP_LOG_LINE@request@ \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,summaryMarkdown,updateTime\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,infra.swarming.taskId,input,number,output,startTime,status,summaryMarkdown,updateTime\", @@@",
"@@@STEP_LOG_LINE@request@ \"id\": \"8922054662172514000\"@@@",
"@@@STEP_LOG_LINE@request@ }@@@",
"@@@STEP_LOG_LINE@request@ }@@@",
@@ -164,13 +252,16 @@
},
{
"cmd": [],
- "name": "display builds"
+ "name": "collect builds.display builds",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"cmd": [],
- "name": "display builds.",
+ "name": "collect builds.display builds.abc",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_NEST_LEVEL@2@@@",
"@@@STEP_LINK@8922054662172514000@https://cr-buildbucket.appspot.com/build/8922054662172514000@@@"
]
},
diff --git a/recipes/devicelab/devicelab_drone_build_test.expected/local-engine.json b/recipes/devicelab/devicelab_drone_build_test.expected/local-engine.json
index 5423f86..39f51e8 100644
--- a/recipes/devicelab/devicelab_drone_build_test.expected/local-engine.json
+++ b/recipes/devicelab/devicelab_drone_build_test.expected/local-engine.json
@@ -11,7 +11,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -32,12 +32,12 @@
"RECIPE_REPO[depot_tools]/gsutil.py",
"----",
"ls",
- "gs://flutter_devicelab/flutter/ci/2d72510e447ab60a9728aeea2362d8be2cbd7789/def"
+ "gs://flutter_devicelab/flutter/prod/2d72510e447ab60a9728aeea2362d8be2cbd7789/def"
],
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -65,7 +65,7 @@
],
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -96,7 +96,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -122,7 +122,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -147,7 +147,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -176,7 +176,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -201,7 +201,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -228,7 +228,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -253,7 +253,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -283,7 +283,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -322,7 +322,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -353,7 +353,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -393,7 +393,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -423,7 +423,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -463,7 +463,7 @@
},
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -505,7 +505,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -548,7 +548,7 @@
},
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -604,7 +604,7 @@
},
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -635,7 +635,7 @@
"cp",
"-r",
"[CLEANUP]/tmp_tmp_2/*",
- "gs://flutter_devicelab/flutter/ci/2d72510e447ab60a9728aeea2362d8be2cbd7789/def"
+ "gs://flutter_devicelab/flutter/prod/2d72510e447ab60a9728aeea2362d8be2cbd7789/def"
],
"cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
"env": {
@@ -663,7 +663,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -675,7 +675,7 @@
},
"name": "gsutil upload artifacts",
"~followup_annotations": [
- "@@@STEP_LINK@artifacts@https://console.cloud.google.com/storage/browser/flutter_devicelab/flutter/ci/2d72510e447ab60a9728aeea2362d8be2cbd7789/def@@@"
+ "@@@STEP_LINK@artifacts@https://console.cloud.google.com/storage/browser/flutter_devicelab/flutter/prod/2d72510e447ab60a9728aeea2362d8be2cbd7789/def@@@"
]
},
{
@@ -713,7 +713,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -759,7 +759,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -805,7 +805,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -851,7 +851,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -897,7 +897,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -947,7 +947,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -960,6 +960,10 @@
"name": "OS info (2)"
},
{
+ "cmd": [],
+ "name": "launch builds"
+ },
+ {
"cmd": [
"bb",
"batch",
@@ -969,7 +973,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -979,16 +983,17 @@
"hostname": "rdbhost"
}
},
- "name": "buildbucket.schedule",
- "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"ci\", \"builder\": \"Linux Devicelab Test Drone\", \"project\": \"test\"}, \"exe\": {\"cipdVersion\": \"refs/heads/master\"}, \"experimental\": \"NO\", \"experiments\": {\"luci.buildbucket.parent_tracking\": false}, \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"git.example.com\", \"id\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\", \"project\": \"test/repo\", \"ref\": \"refs/heads/master\"}, \"priority\": 25, \"properties\": {\"artifact\": \"def\", \"dependencies\": [], \"git_branch\": \"master\", \"parent_builder\": \"Linux abc\", \"tags\": [], \"task_name\": \"abc\"}, \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"parent_buildbucket_id\", \"value\": \"8945511751514863184\"}, {\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
+ "name": "launch builds.schedule",
+ "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"bucket\": \"prod\", \"builder\": \"Linux Production Engine Drone\", \"project\": \"test\"}, \"exe\": {\"cipdVersion\": \"refs/heads/main\"}, \"experimental\": \"NO\", \"experiments\": {\"luci.buildbucket.parent_tracking\": false}, \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,updateTime\", \"gitilesCommit\": {\"host\": \"git.example.com\", \"id\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\", \"project\": \"test/repo\", \"ref\": \"refs/heads/master\"}, \"priority\": 25, \"properties\": {\"artifact\": \"def\", \"build\": {\"drone_dimensions\": [], \"name\": \"abc\", \"properties\": {\"artifact\": \"def\", \"dependencies\": [], \"git_branch\": \"master\", \"parent_builder\": \"Linux abc\", \"tags\": [], \"task_name\": \"abc\"}}, \"dependencies\": [], \"git_branch\": \"master\", \"local_engine\": \"host-release\", \"local_engine_cas_hash\": \"isolatehashlocalengine/22\", \"parent_builder\": \"Linux abc\", \"recipe\": \"devicelab/devicelab_test_drone\", \"tags\": [], \"task_name\": \"abc\"}, \"requestId\": \"8945511751514863184-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"parent_buildbucket_id\", \"value\": \"8945511751514863184\"}, {\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
"~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@",
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"responses\": [@@@",
"@@@STEP_LOG_LINE@json.output@ {@@@",
"@@@STEP_LOG_LINE@json.output@ \"scheduleBuild\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"builder\": {@@@",
- "@@@STEP_LOG_LINE@json.output@ \"bucket\": \"ci\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"builder\": \"Linux Devicelab Test Drone\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"bucket\": \"prod\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"builder\": \"Linux Production Engine Drone\", @@@",
"@@@STEP_LOG_LINE@json.output@ \"project\": \"test\"@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"id\": \"8922054662172514000\"@@@",
@@ -1002,12 +1007,12 @@
"@@@STEP_LOG_LINE@request@ {@@@",
"@@@STEP_LOG_LINE@request@ \"scheduleBuild\": {@@@",
"@@@STEP_LOG_LINE@request@ \"builder\": {@@@",
- "@@@STEP_LOG_LINE@request@ \"bucket\": \"ci\", @@@",
- "@@@STEP_LOG_LINE@request@ \"builder\": \"Linux Devicelab Test Drone\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"bucket\": \"prod\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"builder\": \"Linux Production Engine Drone\", @@@",
"@@@STEP_LOG_LINE@request@ \"project\": \"test\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"exe\": {@@@",
- "@@@STEP_LOG_LINE@request@ \"cipdVersion\": \"refs/heads/master\"@@@",
+ "@@@STEP_LOG_LINE@request@ \"cipdVersion\": \"refs/heads/main\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"experimental\": \"NO\", @@@",
"@@@STEP_LOG_LINE@request@ \"experiments\": {@@@",
@@ -1023,9 +1028,24 @@
"@@@STEP_LOG_LINE@request@ \"priority\": 25, @@@",
"@@@STEP_LOG_LINE@request@ \"properties\": {@@@",
"@@@STEP_LOG_LINE@request@ \"artifact\": \"def\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"build\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"drone_dimensions\": [], @@@",
+ "@@@STEP_LOG_LINE@request@ \"name\": \"abc\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"properties\": {@@@",
+ "@@@STEP_LOG_LINE@request@ \"artifact\": \"def\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"dependencies\": [], @@@",
+ "@@@STEP_LOG_LINE@request@ \"git_branch\": \"master\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"parent_builder\": \"Linux abc\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"tags\": [], @@@",
+ "@@@STEP_LOG_LINE@request@ \"task_name\": \"abc\"@@@",
+ "@@@STEP_LOG_LINE@request@ }@@@",
+ "@@@STEP_LOG_LINE@request@ }, @@@",
"@@@STEP_LOG_LINE@request@ \"dependencies\": [], @@@",
"@@@STEP_LOG_LINE@request@ \"git_branch\": \"master\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"local_engine\": \"host-release\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"local_engine_cas_hash\": \"isolatehashlocalengine/22\", @@@",
"@@@STEP_LOG_LINE@request@ \"parent_builder\": \"Linux abc\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"recipe\": \"devicelab/devicelab_test_drone\", @@@",
"@@@STEP_LOG_LINE@request@ \"tags\": [], @@@",
"@@@STEP_LOG_LINE@request@ \"task_name\": \"abc\"@@@",
"@@@STEP_LOG_LINE@request@ }, @@@",
@@ -1053,14 +1073,14 @@
},
{
"cmd": [],
- "name": "Task Shards",
- "~followup_annotations": [
- "@@@STEP_LINK@@https://cr-buildbucket.appspot.com/build/8922054662172514000@@@"
- ]
+ "name": "collect builds"
},
{
"cmd": [],
- "name": "buildbucket.collect"
+ "name": "collect builds.collect",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"cmd": [
@@ -1069,13 +1089,13 @@
"-host",
"cr-buildbucket.appspot.com",
"-interval",
- "60s",
+ "20s",
"8922054662172514000"
],
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -1085,10 +1105,10 @@
"hostname": "rdbhost"
}
},
- "name": "buildbucket.collect.wait",
- "timeout": 10800,
+ "name": "collect builds.collect.wait",
+ "timeout": 86400,
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_NEST_LEVEL@2@@@"
]
},
{
@@ -1101,7 +1121,7 @@
"infra_step": true,
"luci_context": {
"realm": {
- "name": "test:ci"
+ "name": "test:prod"
},
"resultdb": {
"current_invocation": {
@@ -1111,10 +1131,10 @@
"hostname": "rdbhost"
}
},
- "name": "buildbucket.collect.get",
- "stdin": "{\"requests\": [{\"getBuild\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,summaryMarkdown,updateTime\", \"id\": \"8922054662172514000\"}}]}",
+ "name": "collect builds.collect.get",
+ "stdin": "{\"requests\": [{\"getBuild\": {\"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,infra.swarming.taskId,input,number,output,startTime,status,summaryMarkdown,updateTime\", \"id\": \"8922054662172514000\"}}]}",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_NEST_LEVEL@2@@@",
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"responses\": [@@@",
"@@@STEP_LOG_LINE@json.output@ {@@@",
@@ -1130,7 +1150,7 @@
"@@@STEP_LOG_LINE@request@ \"requests\": [@@@",
"@@@STEP_LOG_LINE@request@ {@@@",
"@@@STEP_LOG_LINE@request@ \"getBuild\": {@@@",
- "@@@STEP_LOG_LINE@request@ \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,input,number,output,startTime,status,summaryMarkdown,updateTime\", @@@",
+ "@@@STEP_LOG_LINE@request@ \"fields\": \"builder,createTime,createdBy,critical,endTime,id,infra,infra.swarming.taskId,input,number,output,startTime,status,summaryMarkdown,updateTime\", @@@",
"@@@STEP_LOG_LINE@request@ \"id\": \"8922054662172514000\"@@@",
"@@@STEP_LOG_LINE@request@ }@@@",
"@@@STEP_LOG_LINE@request@ }@@@",
@@ -1142,13 +1162,16 @@
},
{
"cmd": [],
- "name": "display builds"
+ "name": "collect builds.display builds",
+ "~followup_annotations": [
+ "@@@STEP_NEST_LEVEL@1@@@"
+ ]
},
{
"cmd": [],
- "name": "display builds.",
+ "name": "collect builds.display builds.abc",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
+ "@@@STEP_NEST_LEVEL@2@@@",
"@@@STEP_LINK@8922054662172514000@https://cr-buildbucket.appspot.com/build/8922054662172514000@@@"
]
},
diff --git a/recipes/devicelab/devicelab_drone_build_test.expected/no-artifact-name.json b/recipes/devicelab/devicelab_drone_build_test.expected/no-artifact-name.json
index 3359ba7..ef6e05a 100644
--- a/recipes/devicelab/devicelab_drone_build_test.expected/no-artifact-name.json
+++ b/recipes/devicelab/devicelab_drone_build_test.expected/no-artifact-name.json
@@ -19,7 +19,7 @@
"The recipe has crashed at point 'Uncaught exception'!",
"",
"Traceback (most recent call last):",
- " File \"RECIPE_REPO[flutter]/recipes/devicelab/devicelab_drone_build_test.py\", line 67, in RunSteps",
+ " File \"RECIPE_REPO[flutter]/recipes/devicelab/devicelab_drone_build_test.py\", line 66, in RunSteps",
" raise ValueError('An artifact property is required')",
"ValueError('An artifact property is required')"
]
diff --git a/recipes/devicelab/devicelab_drone_build_test.expected/no-task-name.json b/recipes/devicelab/devicelab_drone_build_test.expected/no-task-name.json
index b37d94c..1f0a929 100644
--- a/recipes/devicelab/devicelab_drone_build_test.expected/no-task-name.json
+++ b/recipes/devicelab/devicelab_drone_build_test.expected/no-task-name.json
@@ -19,7 +19,7 @@
"The recipe has crashed at point 'Uncaught exception'!",
"",
"Traceback (most recent call last):",
- " File \"RECIPE_REPO[flutter]/recipes/devicelab/devicelab_drone_build_test.py\", line 62, in RunSteps",
+ " File \"RECIPE_REPO[flutter]/recipes/devicelab/devicelab_drone_build_test.py\", line 61, in RunSteps",
" raise ValueError('A task_name property is required')",
"ValueError('A task_name property is required')"
]
diff --git a/recipes/devicelab/devicelab_drone_build_test.py b/recipes/devicelab/devicelab_drone_build_test.py
index fc6c601..96fdf6e 100644
--- a/recipes/devicelab/devicelab_drone_build_test.py
+++ b/recipes/devicelab/devicelab_drone_build_test.py
@@ -14,7 +14,6 @@
'flutter/osx_sdk',
'flutter/repo_util',
'flutter/retry',
- 'flutter/shard_util',
'flutter/shard_util_v2',
'flutter/test_utils',
'flutter/token_util',
@@ -76,22 +75,22 @@
build(api, task_name, artifact, artifact_gcs_path)
# Run test step.
- builds = test(
+ targets = test(
api, task_name, api.properties.get('dependencies', []), artifact
)
- builds = api.shard_util.collect_builds(builds)
- api.display_util.display_builds(
- step_name='display builds',
- builds=builds,
- raise_on_failure=True,
- )
+ with api.step.nest('launch builds') as presentation:
+ tasks = api.shard_util_v2.schedule(targets, 'devicelab/devicelab_test_drone', presentation)
+ with api.step.nest('collect builds') as presentation:
+ build_results = api.shard_util_v2.collect(tasks, presentation)
+ api.display_util.display_subbuilds(
+ step_name='display builds',
+ subbuilds=build_results,
+ raise_on_failure=True,
+ )
def test(api, task_name, deps, artifact):
'''Run devicelab test assuming build artifact is available.'''
- git_branch = api.properties.get('git_branch')
- bucket = api.buildbucket.build.builder.bucket
- builder_name = 'Linux_android_staging test_drone' if bucket == 'staging' else 'Linux Devicelab Test Drone'
reqs = []
# Updates tuple to buildbucket API supported list.
tags = [tag for tag in api.properties.get('tags', [])]
@@ -103,23 +102,13 @@
'parent_builder': api.properties.get('buildername'),
'artifact': artifact,
'git_branch': api.properties.get('git_branch'),
- 'tags': tags,
+ 'tags': tags
}
- if 'git_url' in api.properties and 'git_ref' in api.properties:
- test_props['git_ref'] = api.properties['git_ref']
- test_props['git_url'] = api.properties['git_url']
-
- req = api.buildbucket.schedule_request(
- swarming_parent_run_id=api.swarming.task_id,
- builder=builder_name,
- properties=test_props,
- priority=25,
- exe_cipd_version=api.properties.get(
- 'exe_cipd_version', 'refs/heads/%s' % git_branch
- )
+ reqs.append(
+ {'name': task_name, 'properties': test_props,
+ 'drone_dimensions': api.properties.get('drone_dimensions', [])}
)
- reqs.append(req)
- return api.buildbucket.schedule(reqs)
+ return reqs
def build(api, task_name, artifact, artifact_gcs_dir):
@@ -229,6 +218,12 @@
stdout=api.raw_io
.output_text('gs://flutter_devicelab/flutter/refs/pull/1/head/def')
),
+ api.buildbucket.ci_build(
+ project='test',
+ bucket='prod',
+ git_repo='git.example.com/test/repo',
+ git_ref='refs/heads/master',
+ )
)
yield api.test(
"artifact does not exist",
@@ -242,6 +237,7 @@
api.repo_util.flutter_environment_data(checkout_dir=checkout_path),
api.buildbucket.ci_build(
project='test',
+ bucket='prod',
git_repo='git.example.com/test/repo',
),
)
@@ -257,6 +253,7 @@
), api.repo_util.flutter_environment_data(checkout_dir=checkout_path),
api.buildbucket.ci_build(
project='test',
+ bucket='prod',
git_repo='git.example.com/test/repo',
git_ref='refs/heads/master',
)