-
-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eliminate sleep from android emulator doc examples (#4277)
### Summary This should fix the android job back to green and has some improvements on handling the android emulator in the CI (and locally) , part of which eliminates the need for sleep hack in documentation examples. Job reference on my fork can be found [here](https://github.com/vaslabs-ltd/mill/actions/runs/12688329695/job/35364858469) . ~~Sometimes the device may be stuck in unauthorized, I don't know the reason yet and can't yet replicate it locally .~~ #### Unauthorized issue In https://github.com/ReactiveCircus/android-emulator-runner, it seems that the same issue occurs when caching is used. ~~I'm wondering if there's any implicit caching that I have missed in the github actions~~ After experimenting with https://github.com/vaslabs-ltd/test-android-emulator , it seems that the runner avd directory is polluted. Although I'm not sure why, deleting it (at least in test-android-emulator) fixes the unauthorized issue . I've added the same in the github action here ### Improvements - Removed the need for sleep in doc examples by implementing a new wait for device boot flag, that's used internally by startAndroidEmulator in addition to listening for the booted log message. Having both can help identify potential issues locally or in a CI . `Task.Command(exclusive = true)` as suggested by @lihaoyi seems to have made it very stable ### Fixes - Fixed the bundle failing for the manifest/AndroidManifest.xml error message by flattening the zip file. I am not sure when this broke, but bundle is not in my radar in the immediate future, so my focus was to keep it green for now. Bundle build tool also seems to be marked as experimental, not that it's an issue, just a mention. ### Note For the wait, I initially had it in a task and used a while loop but changed my mind and having it outside of task context seems easier to control the behaviour . I can convert it into a tailrec function if you prefer that style EDIT: changed the outcome of unauthorized after some experimentation on a clean repo
- Loading branch information
Showing
5 changed files
with
50 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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