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

Start chromedriver with PartitionSupervisor #692

Merged
merged 8 commits into from
Jul 15, 2022
Merged

Conversation

mhanberg
Copy link
Member

@mhanberg mhanberg commented May 30, 2022

This will open as many chromedrivers you have as cores, and partition
access to them based on the test pid. This effectively acts as a
"pool" of chromedrivers without needing logic to check them in and out
of the pool.

It just acts as if there is a single chromedriver and it seems to just
work.

  • This vendors the PartitionSupervisor from the elixir-lang repository, as it will be released with 1.14 and we won't want to require that immediately.

TODO

Add the Elixir-lang license to the partition supervisor file.

Related to #365


@AndroidOatmeal do you mind testing out this branch?

This will open as many chromedrivers you have as cores, and partition
them access to them based on your test pid. This effectively acts as a
"pool" of chromedrivers without needing logic to check them in and out
of the pool.

It just acts as if there is a single chromedriver and it seems to just
work.

Related to #365
@mhanberg
Copy link
Member Author

mhanberg commented Jun 4, 2022

@AndroidOatmeal pinging you again in case the last notification got lost.

@AndroidOatmeal
Copy link

@mhanberg Thank you! It's been a busy week so far, but I'll test this out in the next couple days

@mhanberg
Copy link
Member Author

mhanberg commented Jun 8, 2022

@AndroidOatmeal no worries, I really appreciate it!

@AndroidOatmeal
Copy link

@mhanberg I spent some time testing this out today and I'm happy to say it seems to work great! I can't tell you how excited I feel lol. Thanks again for the assist here.

I've been running our acceptance test suite over and over with this wallaby branch trying to flush out any hiding issues. Strangely, once I got the usual (RuntimeError) Wallaby had an internal issue, but it only happened with a seemingly random pair of tests, and the rest of the suite finished successfully. Even after 10 runs of our suite, I haven't been able to reproduce this again, but I'll let you know if this or other issues pop up.

@mhanberg
Copy link
Member Author

Thanks for testing this out!

I just returned from a work trip so I'll hopefully get this tidied up and merged in the next few days.

I'll probably publish a release candidate and have more people try it out for a little bit then I'll publish the actual release.

@mhanberg
Copy link
Member Author

I contracted covid during the aforementioned work trip, so I haven't gotten around to this 😅. I hope to get an RC release out in the next couple days.

@AndroidOatmeal
Copy link

@mhanberg Sorry to hear about the covid — it really whooped my ass too. Hope you're feeling better!

mhanberg added 2 commits July 14, 2022 17:03
Since we are vendoring this from the Elixir codebase, we attribute the
project by providing its license in the file.
@@ -0,0 +1,565 @@
# Apache License
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josevalim is it okay to vendor partition supervisor like this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I believe you need the copyright notice and a link to the repo.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a link, thank you! I appreciate the clarification.

mhanberg added 5 commits July 14, 2022 17:17
Formatting has changed since we have updated the minimum Elixir version.
It seems that using `:all` with IO.binread has changed between v1.12 and
v1.13, and is causing a Dialyzer problem. This patch adds some compile
time logic to call it with the right argument based on the Elixir
version.
@mhanberg mhanberg merged commit 7119602 into main Jul 15, 2022
@mhanberg mhanberg deleted the mh/chromedriver-thing branch July 15, 2022 01:17
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.

3 participants