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

github.com の Actions ランナー macos-12 で走る Instrumented test が flaky である #32

Closed
private-yusuke opened this issue Dec 15, 2022 · 4 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@private-yusuke
Copy link
Owner

概要

この部分の job が確率的に落ちることがある。手動でリトライすると通ることがあるが、煩雑である。
具体的な処理としては x86-64 な Android のエミュレータが QEMU で走っており、instrumented test 自体が開始されるまでに 15 分程度の時間がかかる。確率的に落ちるのは、このテストの実行中に発生するものであり、特段理由を吐かずに死ぬケースもあったと記憶している。

解決案

https://circleci.com/ja/product/features/resource-classes/ を見ていると無料で 4 CPU, 16 GB RAM な Arm VM を使わせてくれるらしい。これを使ったら安定稼動かつテスト時間が半分ぐらいになったりしないかなと気になっている。

あるいは、github.com が arm64 な runner を提供しはじめてくれると非常に助かる(他力本願)。

@private-yusuke
Copy link
Owner Author

あまりに flaky すぎて耐えられなかったので、一時的に CI で走らせることを諦めた。
#43 (comment)

@private-yusuke
Copy link
Owner Author

#64 で外部の物理デバイスを用いて instrumented test を走らせるようにした。これは安定して動作しているように思える。

off-topic

これは趣味の話で必要性はほぼ無いが、自分で GitHub Actions の self-hosted runner を作成し、そこに余っている Android 端末を接続しておいて instrumented test を走らせるのも少し面白いのではないかと考えている。

ちなみに AWS には AWS Device Farm というサービスを提供しており、ここでは最初の 1,000 分だけ無料で端末を利用させてくれるらしく、そこで instrumented test を走らせることも可能らしい。しかし、このサービスは Firebase Test Lab のように一定期間ごとに quota を復活させるような機構は無いため、将来的に料金が発生する可能性がある。そのためこのプロジェクトでは利用しない。

@private-yusuke
Copy link
Owner Author

#32 (comment) で趣味の話と書いていたものを #69 でとりあえず実現してみたら思ったより高速にテストが完了することがわかったので飽きるまでこの体制にしてみる

@private-yusuke
Copy link
Owner Author

普通に #69 のそれがいい感じに動いて 1 ヶ月以上経過した。安定した instrumented test を実行するという当初の課題を解決したものとして close します。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant