Skip to content

Request higher SafeLevel builds when requesting Android build by branch#2667

Merged
Databean merged 1 commit into
google:mainfrom
Databean:request-higher-safe-level
Jun 11, 2026
Merged

Request higher SafeLevel builds when requesting Android build by branch#2667
Databean merged 1 commit into
google:mainfrom
Databean:request-higher-safe-level

Conversation

@Databean

@Databean Databean commented Jun 5, 2026

Copy link
Copy Markdown
Member

In cvd fetch, when requesting a build by branch and target, prefer requesting higher SafeLevel builds (PLATINUM, SAFE_2, SAFE_1) when possible before falling back to any complete successful build (SAFE_0 / unspecified).

If users want a specific build id, that is already possible to request through command line arguments. When a user requests a branch by name, they probably do not care as much how recent the build is. In the case of our presubmit, this will hopefully reduce flakes that come from the device side.

The main failure mode here is if a build target / branch combination has previously reported a higher safe level and no longer does, it will get stuck on the older build from the higher safe level indefinitely.

Assisted-by: Jetski:Gemini Next
Bug: b/518049553

@Databean Databean requested a review from cjreynol June 5, 2026 00:40
Comment thread base/cvd/cuttlefish/host/libs/web/android_build_api.cpp Outdated
Comment thread base/cvd/cuttlefish/host/libs/web/android_build_api.cpp Outdated
Comment thread base/cvd/cuttlefish/host/libs/web/android_build_api.cpp Outdated
Comment thread base/cvd/cuttlefish/host/libs/web/android_build_api.cpp Outdated
@Databean Databean force-pushed the request-higher-safe-level branch 2 times, most recently from f0cdf05 to f077e54 Compare June 5, 2026 21:51

@Databean Databean left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing!

Comment thread base/cvd/cuttlefish/host/libs/web/android_build_api.cpp Outdated
Comment thread base/cvd/cuttlefish/host/libs/web/android_build_api.cpp Outdated
Comment thread base/cvd/cuttlefish/host/libs/web/android_build_api.cpp Outdated
@Databean Databean requested a review from cjreynol June 5, 2026 21:58
@Databean Databean added kokoro:force-run Trigger a presubmit build unconditionally. kokoro:run Run e2e tests. labels Jun 6, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed kokoro:run Run e2e tests. kokoro:force-run Trigger a presubmit build unconditionally. labels Jun 6, 2026
@Databean Databean force-pushed the request-higher-safe-level branch from f077e54 to 4acbd48 Compare June 9, 2026 00:11
@Databean Databean added the kokoro:run Run e2e tests. label Jun 9, 2026
@Databean

Databean commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

Thanks for reviewing!

@Databean Databean enabled auto-merge June 9, 2026 00:11
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Jun 9, 2026
@Databean Databean force-pushed the request-higher-safe-level branch from 4acbd48 to b8b5ae2 Compare June 11, 2026 15:51
In cvd fetch, when requesting a build by branch and target, prefer
requesting higher SafeLevel builds (PLATINUM, SAFE_2, SAFE_1) when
possible before falling back to any complete successful build (SAFE_0 /
unspecified).

If users want a specific build id, that is already possible to request
through command line arguments. When a user requests a branch by name,
they probably do not care as much how recent the build is. In the case
of our presubmit, this will hopefully reduce flakes that come from the
device side.

The main failure mode here is if a build target / branch combination has
previously reported a higher safe level and no longer does, it will get
stuck on the older build from the higher safe level indefinitely.

Assisted-by: Jetski:Gemini Next
Bug: b/518049553
@Databean Databean force-pushed the request-higher-safe-level branch from b8b5ae2 to c322256 Compare June 11, 2026 17:09
@Databean Databean added the kokoro:run Run e2e tests. label Jun 11, 2026
@Databean Databean added this pull request to the merge queue Jun 11, 2026
Merged via the queue into google:main with commit 0fd64f5 Jun 11, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kokoro:run Run e2e tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants