Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace waiting for android emulator with a sleep and a list device call to verify emulator is running #4261

Merged

Conversation

vaslabs
Copy link
Contributor

@vaslabs vaslabs commented Jan 7, 2025

I've tried to replicate why the timeouts related to the android emulator that happen in github actions. It seems that the adb wait-for-device is stuck although I cannot replicate it locally and the kotlin example does not suffer the same issue.

So for now, I added some wait time after start emulator and a call to adb device to verify the device is indeed present and it seems to be working.

This should work for the time being and make the job green until we create a better alternative.

Small change included: Since we throw an error if we don't detect the boot notification of start emulator, I changed the startAndroidEmulator signature from Option[String] to String

Linking the green job on my copy for reference: https://github.com/vaslabs-ltd/mill/actions/runs/12651834850/job/35253442650

@lihaoyi
Copy link
Member

lihaoyi commented Jan 7, 2025

Looks like CI passed! Hope we start seeing it turn green again in main

@lihaoyi lihaoyi merged commit f962cce into com-lihaoyi:main Jan 7, 2025
26 checks passed
@lefou lefou added this to the 0.12.6 milestone Jan 8, 2025
@0xnm
Copy link
Contributor

0xnm commented Jan 8, 2025

what is the need for the sleep call in the example script? I don't think we can expect that all users will do this. Instead, the API should be self-contained: operation should be blocking until it is complete, e.g. startAndroidEmulator should finish only when emulator is up and completely ready for the interaction.

@vaslabs
Copy link
Contributor Author

vaslabs commented Jan 9, 2025

what is the need for the sleep call in the example script? I don't think we can expect that all users will do this. Instead, the API should be self-contained: operation should be blocking until it is complete, e.g. startAndroidEmulator should finish only when emulator is up and completely ready for the interaction.

yes you are right, I'll take care of it in the next PR . there's a glitch in github actions that I'm still investigating, the startAndroidEmulator waits for the boot message, I'll do more tests and push something better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants