[sdk] Don't relocate non-smart image archives
Non-smart builders no longer produce image archives so we shouldn't try
to relocate them or it will result in failures like
https://ci.chromium.org/b/8745173840369293377.
Bug: 335458922
Change-Id: Ie7abf50ad0670ae369c8a155a2b99f7e73e5f28e
Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/recipes/+/1065974
Reviewed-by: Aidan Wolter <awolter@google.com>
Fuchsia-Auto-Submit: Oliver Newman <olivernewman@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
diff --git a/recipes/sdk.expected/release_with_companion_images.json b/recipes/sdk.expected/release_with_companion_images.json
index 4660461..e07a721 100644
--- a/recipes/sdk.expected/release_with_companion_images.json
+++ b/recipes/sdk.expected/release_with_companion_images.json
@@ -2402,8 +2402,8 @@
"-o",
"GSUtil:software_update_check_period=0",
"cp",
- "gs://###BUCKET###/builds/9876543210/build-archive.tgz",
- "gs://fuchsia/development/0.20191018.0.1/images/###OTHER_SDK_IMAGE###.tgz"
+ "gs://###BUCKET###/builds/123456789/build-archive.tgz",
+ "gs://fuchsia/development/0.20191018.0.1/images/smart_image.tgz"
],
"infra_step": true,
"luci_context": {
@@ -2421,35 +2421,7 @@
"name": "relocate companion image archives.gsutil cp",
"~followup_annotations": [
"@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LINK@###OTHER_SDK_IMAGE### build-archive@https://storage.cloud.google.com/fuchsia/development/0.20191018.0.1/images/%23%23%23OTHER_SDK_IMAGE%23%23%23.tgz@@@"
- ]
- },
- {
- "cmd": [
- "[START_DIR]/cipd_tool/infra/3pp/tools/gsutil/0e548aa33f8113a45a5b3b62201e114e98e63d00f97296912380138f44597b07/gsutil",
- "-o",
- "GSUtil:software_update_check_period=0",
- "cp",
- "gs://###BUCKET###/builds/123456789/build-archive.tgz",
- "gs://fuchsia/development/0.20191018.0.1/images/###SDK_IMAGE###.tgz"
- ],
- "infra_step": true,
- "luci_context": {
- "realm": {
- "name": "fuchsia:ci"
- },
- "resultdb": {
- "current_invocation": {
- "name": "invocations/build:8945511751514863184",
- "update_token": "token"
- },
- "hostname": "rdbhost"
- }
- },
- "name": "relocate companion image archives.gsutil cp (2)",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@",
- "@@@STEP_LINK@###SDK_IMAGE### build-archive@https://storage.cloud.google.com/fuchsia/development/0.20191018.0.1/images/%23%23%23SDK_IMAGE%23%23%23.tgz@@@"
+ "@@@STEP_LINK@smart_image build-archive@https://storage.cloud.google.com/fuchsia/development/0.20191018.0.1/images/smart_image.tgz@@@"
]
},
{
diff --git a/recipes/sdk.py b/recipes/sdk.py
index b9152e1..801ce8d 100644
--- a/recipes/sdk.py
+++ b/recipes/sdk.py
@@ -462,6 +462,10 @@
for image in props.companion_images
if image.builder == b.build_proto.builder.builder
)
+ # HACK: Only smart product images still require build archives
+ # to be uploaded.
+ if "smart" not in image_name:
+ continue
src_bucket = api.subbuild.get_property(b.build_proto, "gcs_bucket")
src_bucket = src_bucket.strip('"')
api.gsutil.copy(
@@ -736,11 +740,11 @@
companion_images = [
{
- "name": "###SDK_IMAGE###",
+ "name": "smart_image",
"builder": "###SDK_IMAGE_BUILDER###",
},
{
- "name": "###OTHER_SDK_IMAGE###",
+ "name": "other_image",
"builder": "###OTHER_SDK_IMAGE_BUILDER###",
},
]