fix(e2e): make CI green by retrying flaky Patrol native automation (Android) - #1097
Closed
Lyokone wants to merge 1 commit into
Closed
fix(e2e): make CI green by retrying flaky Patrol native automation (Android)#1097Lyokone wants to merge 1 commit into
Lyokone wants to merge 1 commit into
Conversation
The Android e2e job is the only *blocking* job in the e2e workflow (iOS, Web, macOS and Windows are all already continue-on-error). It was the sole reason the whole e2e run went red on #1096: Patrol's native UIAutomator grantPermissionWhenInUse() intermittently returns "Invalid response: 404 -- selector button to allow permission while using found nothing" when the Android system permission dialog hasn't finished rendering the instant Patrol polls for it. This is timing flake, not a regression: the identical test path passed on #1094 and failed on #1096 with no change to it. Wrap each `patrol test` invocation in an inline retry (up to 3 attempts, 5s apart). A genuine failure still exits non-zero after the retries, so real breakage stays red.
Lyokone
force-pushed
the
fix/e2e-android-patrol-retry
branch
from
July 22, 2026 14:30
c72d118 to
0a85baf
Compare
Owner
Author
|
Superseded: instead of retrying the flaky Patrol e2e suite, we're removing the slow e2e/patrol setup entirely and relying on the fast mockito unit tests + location-prepare build/analyze jobs. See the follow-up PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gets the PR CI green. After tracing every red job on #1096, only one blocking job was actually failing the CI: the
Androidjob in thee2eworkflow.The
e2erun reportedfailure, but itsiOS,Web,macOSandWindowsjobs are all alreadycontinue-on-error: true(documented upstream Patrol / platform limitations) — their red ❌ don't fail the run.Linuxpassed. Thelocation prepareworkflow already reportssuccess(its only red job,macOS, is likewise non-blocking). So the whole thing was red solely because the one remaining blocking mobile gate —Android— flaked.Root cause
The Android job failed at:
That's Patrol's native UIAutomator not finding the Android system permission dialog button — a well-known transient emulator flake where the dialog hasn't finished rendering the instant Patrol polls for it. The app built and ran fine; the exact same test path passed on #1094 and failed on #1096 with no change to it. It's timing flake, not a regression.
Change
Wrap each
patrol testinvocation in the Android job's script in an inline retry (up to 3 attempts, 5s apart). A genuine failure stillexit 1s after the retries, so real breakage stays red — this only absorbs the transient native-automation flake.sh -nand dry-ran the loop (3 attempts →exit 1on persistent failure).reactivecircus/android-emulator-runnerdocumented in the job.Not touched (deliberately)
The
iOS/Web/macOS/Windowsred ❌ are pre-existing, documented, and already non-blocking (continue-on-error), for genuine upstream/platform reasons (Patrol's macOSPackage.swiftbug, a missing iOSRunnerUITeststarget needing Xcode, a Windows headless-session permission limitation, an unidentified webpatrolblocker). This PR intentionally leaves them as-is rather than papering over them.