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

Restarting test when devices are available #102

Open
fvisticot opened this issue Apr 21, 2020 · 5 comments
Open

Restarting test when devices are available #102

fvisticot opened this issue Apr 21, 2020 · 5 comments

Comments

@fvisticot
Copy link

Is there a solution to restart the test once the devices are available on the Device farm side ?
Some time I get the error:
Error: device: 'name:Apple iPhone 8 Plus, model:A1864, os:12.1.0, deviceType:ios, formFactor:phone, availability:BUSY' is busy.

@mmcc007
Copy link
Owner

mmcc007 commented Apr 21, 2020

If in a CI/CD environment can perhaps auto-retry. Other than that the only options AFAIK are to wait for device to become available or change to a less popular device.

@tim-fdc
Copy link

tim-fdc commented Apr 21, 2020

Hi,
having a fork here that skips busy devices. Still need to finalize the changes. Also added a random selection of pools. Both is via the sylph.yaml. For us this really helped to get more reliable test executions and good device coverage. Oh and yes, agree with @mmcc007 regarding the rety. We have that as well.

So, summarizing:

  • skip busy
  • random pool selection
  • retry in CI

@mmcc007 Regarding the local dependencies we also added a check to avoid adding packages, which may lead to cyclic dependencies. Would you be interested in a PR?

Happpy Hakking
Tim

@mmcc007
Copy link
Owner

mmcc007 commented Apr 22, 2020

@tim-fdc Sure, would love to see a PR on this. Thnx.

@mcmarkj
Copy link

mcmarkj commented Jun 18, 2020

@tim-fdc Are you able to share your fork, please? Would be incredibly useful!

@mcmarkj
Copy link

mcmarkj commented Jun 18, 2020

I gave it a stab: #109

We were facing lots and lots of issues where builds would fail very often as devices were in use. Instead we opted to have a big list of devices to test against, confident this covers the devices in our user base. This means that if any devices were unavailable this was acceptable. But if every device was unavailable that should == a failed step in our CI pipeline.

I've not gone for the full re-try as discussed above. Quite simply because we use GitHub actions and if we waited until a device became available I'd bankrupt the company. Instead, I've set it to skip but it would fail if no devices are available.

Perhaps a further improvement that someone could look into is a toggle on what action you'd like when a device is unavailable. I.e. die if any one device is unavailable / skip unavailable devices and continue with tests.

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

No branches or pull requests

4 participants