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

Verify network connectivity for Android mobile devices #8232

Closed
Tracked by #9136
premun opened this issue Dec 1, 2021 · 4 comments · Fixed by #8429
Closed
Tracked by #9136

Verify network connectivity for Android mobile devices #8232

premun opened this issue Dec 1, 2021 · 4 comments · Fixed by #8429
Assignees

Comments

@premun
Copy link
Member

premun commented Dec 1, 2021

Context

We have seen issues where Android devices in Helix lose internet connectivity (e.g. caused by network switch failure, so not an issue with the devices themselves). The problem is that this doesn't manifest right away as most tests don't need internet but when an app that needs it hits the affected device, it fails. This creates random failures which are hard to detect or mitigate.

Goal

We should perform some network test before the work item or maybe just in case of failures and retry the work item to mitigate issues.
We also need to have telemetry about that so that we can be alerted and fix the connectivity issues.

We can use the adb shell ping command which performs ping from the device.

@akoeplinger
Copy link
Member

Doing it all the time before every workitem might be overkill, I'd prefer only doing it when the workitem fails (and we need to make sure to retry on a different machine).

@premun
Copy link
Member Author

premun commented Dec 1, 2021

I agree with the overkill. We can totally do it afterwards, however, Helix currently cannot guarantee it will be a different machine.
We can hope that our alerting will notify FR fast enough and they will take the machine offline.

@premun
Copy link
Member Author

premun commented Dec 6, 2021

I checked and xharness.exe android adb -- shell ping 8.8.8.8 returns exit code 2 for failed network. I need to verify for success but this should give us an easy way

@premun premun self-assigned this Dec 13, 2021
premun added a commit that referenced this issue Jan 13, 2022
### Context
We often see Android devices losing their WiFi connection and going offline. In this case, we are still able to install apps via the USB cable and run most of the tests.

Some of the test apps require internet though (such as `System.Net.*.Tests`) and no connectivity usually means the tests fail. From infrastructure point of view, we have no idea that there was this problem though.

### This change

.. performs a network check from the device in case of any Android device failure and retries the work item on a different machine in case the WiFi connection is down.

We also send telemetry event so that we learn about the device without connectivity.

More details in #8232
@premun
Copy link
Member Author

premun commented Feb 3, 2022

We have decided that failures are not that common and that the check is super fast to do so we can afford to do it every time we see a failure

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 a pull request may close this issue.

2 participants