ci(android): store AVD on /mnt for emulator e2e workflows#18387
ci(android): store AVD on /mnt for emulator e2e workflows#18387mikehardy wants to merge 1 commit into
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
Problem
This was an e2e flake failure mode that surfaced on the sister repository react-native-firebase, I'm porting it here in an attempt to solve an e2e failure that will hit here, before it does 🫡
On GitHub-hosted
ubuntu-latestrunners, AVD userdata is created on the root filesystem (/). After bootstrap, Gradle, and SDK install,/can drop to ~7 GB free while a fresh API 36 AVD needs ~7.4 GB — the emulator fails immediately:Runners also mount a secondary volume at
/mnt(~66–74 GB free) that we were not using for AVD storage. FlutterFire currently runs API 34 (smaller userdata) and frees disk before the emulator, so this has not surfaced yet, but the same failure mode applies on cache misses or future API bumps.How android-emulator-runner uses
ANDROID_AVD_HOMEsdk-installer.tssetsANDROID_AVD_HOME(viacore.exportVariable) to$HOME/.android/avd.emulator-manager.tscreates the AVD under${process.env.ANDROID_AVD_HOME}/${avdName}.avd. The action README’s AVD cache example also documents caching~/.android/avd/*.Fix
In all three
android-emulator-runnerworkflows (android.yaml,e2e_tests_pipeline.yaml,e2e_tests_fdc.yaml):/mnt/avdandchownit before cache restore /avdmanager create avd./mnt/avd/*instead of~/.android/avd/*.$HOME/.android/avd→/mnt/avdbefore the action runs (the action always targets$HOME/.android/avd; apre-emulator-launch-scriptsymlink is too late).ANDROID_AVD_HOME: /mnt/avdon the emulator-runner step.Test plan
android.yaml) green on PRe2e_tests_pipeline.yaml) green on PRe2e_tests_fdc.yaml) green on PR