Skip to content

Commit 11d25c3

Browse files
authored
Use stable cuttlefish build if available. (#4652)
Ensures that the stable Cuttlefish build id is used if a valid build ID (bid) is present in stable_build_info.json, else uses tip-of-tree build id for cuttlefish devices.
1 parent 3c55bf3 commit 11d25c3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/clusterfuzz/_internal/platforms/android/fetch_artifact.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,13 @@ def get_latest_artifact_info(branch, target, signed=False):
210210
# TODO(https://github.com/google/clusterfuzz/issues/3950)
211211
# After stabilizing the Cuttlefish image, revert this
212212
if environment.is_android_cuttlefish():
213-
return get_stable_build_info()
213+
build_info = get_stable_build_info()
214+
# Use tip-of-tree build if 'bid' is missing or 0.
215+
# Setting 'bid' to 0 in stable_build_info.json
216+
# allows for easy switching between stable build
217+
# and tip-of-tree builds.
218+
if 'bid' in build_info and build_info['bid'] != '0':
219+
return build_info
214220

215221
request = client.build().list( # pylint: disable=no-member
216222
buildType='submitted',

0 commit comments

Comments
 (0)