ci(e2e): retry the API-29 emulator boot to absorb the android-emulator-runner keyevent race #222

Merged
JMR-dev merged 1 commits from ci-e2e-boot-retry into main 2026-07-03 15:35:58 +00:00
JMR-dev commented 2026-07-03 15:23:41 +00:00 (Migrated from github.com)

Absorbs the intermittent API-29 E2E failure diagnosed in #217 — an emulator snapshot-restore boot race in reactivecircus/android-emulator-runner, not a test failure.

Cause

On snapshot resume, sys.boot_completed=1 is restored before system_server republishes its binder services, so the action's un-guarded, fatal post-boot adb shell input keyevent 82 throws ServiceNotFoundException: No service published for: input and the job aborts before Gradle runs (fast-fail ~1m43s; ~2%, API-29-only). Evidence: run 28667366203 (PR #209).

Change

Make the "Run E2E tests" step non-fatal (id: e2e + continue-on-error: true) and add a guarded second attempt (if: steps.e2e.outcome == 'failure'). Two independent boots drop the ~2% race to ~0.04%. No matrix or androidTest changes; outcome (not conclusion) is used so a genuine test failure on both attempts still fails the job.

The definitive fix — converging the matrix job on the e2e-preview job's manual-boot pattern (which already guards keyevent 82 || true) — is tracked in #218.

Closes #217

🤖 Generated with Claude Code

Absorbs the intermittent **API-29 E2E** failure diagnosed in #217 — an emulator **snapshot-restore boot race** in `reactivecircus/android-emulator-runner`, not a test failure. ## Cause On snapshot resume, `sys.boot_completed=1` is restored before `system_server` republishes its binder services, so the action's un-guarded, fatal post-boot `adb shell input keyevent 82` throws `ServiceNotFoundException: No service published for: input` and the job aborts **before Gradle runs** (fast-fail ~1m43s; ~2%, API-29-only). Evidence: run 28667366203 (PR #209). ## Change Make the "Run E2E tests" step non-fatal (`id: e2e` + `continue-on-error: true`) and add a guarded second attempt (`if: steps.e2e.outcome == 'failure'`). Two independent boots drop the ~2% race to ~0.04%. No matrix or androidTest changes; `outcome` (not `conclusion`) is used so a genuine test failure on **both** attempts still fails the job. The definitive fix — converging the matrix job on the `e2e-preview` job's manual-boot pattern (which already guards `keyevent 82 || true`) — is tracked in #218. Closes #217 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.