Skip to content

[BootstrapTasks] add retry logic to <StartAndroidEmulator/>#10577

Merged
jonathanpeppers merged 1 commit intomainfrom
dev/peppers/emulator-retry
Nov 7, 2025
Merged

[BootstrapTasks] add retry logic to <StartAndroidEmulator/>#10577
jonathanpeppers merged 1 commit intomainfrom
dev/peppers/emulator-retry

Conversation

@jonathanpeppers
Copy link
Member

Context: https://devdiv.visualstudio.com/DevDiv/DevDiv%20Team/_build/results?buildId=12734439&view=logs&j=ac1a11c5-6d61-571c-5f0e-9a5f6f202a84&t=a6adf3be-39cf-544a-82ab-2177dae81ee6&l=13

The Windows > Tests > Debugging lane commonly fails due to emulator startup issues, such as:

C:\a\_work\1\s\build-tools\scripts\TestApks.targets(76,5): error : Emulator failed to start: C:\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64-headless.exe: failed to initialize WHPX: Invalid argument [C:\a\_work\1\s\src\Xamarin.Android.Build.Tasks\Tests\Xamarin.Android.Build.Tests\Emulator.csproj]
Build FAILED.

Let's add some basic retry logic, and handle the failed to initialize WHPX message as a "retryable" error.

Context: https://devdiv.visualstudio.com/DevDiv/DevDiv%20Team/_build/results?buildId=12734439&view=logs&j=ac1a11c5-6d61-571c-5f0e-9a5f6f202a84&t=a6adf3be-39cf-544a-82ab-2177dae81ee6&l=13

The `Windows > Tests > Debugging` lane commonly fails due to emulator startup
issues, such as:

    C:\a\_work\1\s\build-tools\scripts\TestApks.targets(76,5): error : Emulator failed to start: C:\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64-headless.exe: failed to initialize WHPX: Invalid argument [C:\a\_work\1\s\src\Xamarin.Android.Build.Tasks\Tests\Xamarin.Android.Build.Tests\Emulator.csproj]
    Build FAILED.

Let's add some basic retry logic, and handle the `failed to initialize
WHPX` message as a "retryable" error.
@jonathanpeppers jonathanpeppers marked this pull request as ready for review November 7, 2025 01:13
@jonathanpeppers jonathanpeppers merged commit 9318103 into main Nov 7, 2025
59 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/peppers/emulator-retry branch November 7, 2025 16:26
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant