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

[Epic] DAS Phase 1: Global device allocation #3573

Closed
4 tasks done
Tracked by #4173
d4vidi opened this issue Aug 30, 2022 · 0 comments
Closed
4 tasks done
Tracked by #4173

[Epic] DAS Phase 1: Global device allocation #3573

d4vidi opened this issue Aug 30, 2022 · 0 comments

Comments

@d4vidi
Copy link
Collaborator

d4vidi commented Aug 30, 2022

Description

When using the android.genycloud device type, it is not possible to run multiple detox test … commands in parallel like that:

detox test -c android.geny.release -n Recipe1 & \ # session.id = e54490fd-7cb7-e05a-586e-c3ec23540496
detox test -c android.geny.release -n Recipe2 & \ # session.id = 1acee489-e9d3-4a82-8e50-24f723f60ff8
wait

The problem is that the fastest command would go over the ~/Library/Detox/genycloud-cleanup.lock, e.g.:

[
  {"id":"d9d09cbf-df0b-4044-ae07-32d794a65d49","data":{"name":"Detox.e54490fd-7cb7-e05a-586e-c3ec23540496.w1"}},
  {"id":"39178451-9b6f-43b9-9053-7321294255ab","data":{"name":"Detox.1acee489-e9d3-4a82-8e50-24f723f60ff8.w1"}},
]

and stop all the instances, including the ones that do not belong to its test session.

In this example, if the session e54490fd-7cb7-e05a-586e-c3ec23540496 completes faster and cleans up, then the slower one,1acee489-e9d3-4a82-8e50-24f723f60ff8, will start failing after this, because its device will have been stopped by that moment.

Suggested solution

Move the device allocation to the primary (global) context and stop using lock files in the Genymotion SaaS drivers. The global allocation mechanism will track all the devices created throughout the test session, but since it will be happening in memory, there will no longer be a shared file to fight over. Voila! No file – no problem.

Gameplan

Tasks

  1. platform: android status: accepted type: bug 🐞
    noomorph
  2. domain: stability platform: android status: accepted type: enhancement ⚡️ 📌 pinned
    noomorph
@d4vidi d4vidi closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2022
@noomorph noomorph changed the title [Detox 20] Fix Genycloud cleanup behavior [DAS Phase 1] Fix Genycloud cleanup behavior Oct 5, 2022
@noomorph noomorph reopened this Oct 5, 2022
@d4vidi d4vidi changed the title [DAS Phase 1] Fix Genycloud cleanup behavior [Epic]: [DAS Phase 1] Fix Genycloud cleanup behavior Aug 27, 2023
@d4vidi d4vidi changed the title [Epic]: [DAS Phase 1] Fix Genycloud cleanup behavior [Epic] DAS Phase 1: Fix Genycloud cleanup behavior Aug 27, 2023
@noomorph noomorph changed the title [Epic] DAS Phase 1: Fix Genycloud cleanup behavior [Epic] DAS Phase 1: Global device allocation Aug 28, 2023
@d4vidi d4vidi self-assigned this Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants