-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix running stability jobs for wdspec in Firefox #41243
Conversation
Ideally we'd rename this everywhere, but in the meantime, avoid inventing new names/patterns for specific functions.
This is a small optimisation for cases where paths are passed in.
2b633c1
to
42ca367
Compare
executor_kwargs["webdriver_binary"] = kwargs.get("webdriver_binary") | ||
executor_kwargs["webdriver_args"] = kwargs.get("webdriver_args") | ||
executor_kwargs["binary"] = kwargs["binary"] | ||
executor_kwargs["binary_args"] = kwargs["binary_args"][:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what's the benefit for using [:]
instead of just .copy()
? The latter seems to be in use way more often in this repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly that .copy()
on lists is only 3.3+ so I didn't know about it (.copy()
on dictionaries is much older). I've changed it now.
Otherwise if the value is mutated later we'll end up also mutating the original value, and this can cause problems when rerunning multiple times. In particular this fixes a bug with the Firefox stability job where we were duplicating the binary agument to geckodriver and therefore only the first iteration completed successfully.
42ca367
to
528ad0f
Compare
528ad0f
to
702c295
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a check as run in GitHub actions and it looks all fine to me. Good to see that the stability job is finally passing again. Thanks a lot @jgraham.
Note: Please revert the test change before merging.
These were failing because we were passing duplicate
--binary
arguments to geckodriver. That occurred because we were mutating a reference to a singlewebdriver_args
list on each iteration.