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

Fix running stability jobs for wdspec in Firefox #41243

Merged
merged 3 commits into from
Aug 1, 2023
Merged

Conversation

jgraham
Copy link
Contributor

@jgraham jgraham commented Jul 31, 2023

These were failing because we were passing duplicate --binary arguments to geckodriver. That occurred because we were mutating a reference to a single webdriver_args list on each iteration.

@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Jul 31, 2023
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.
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"][:]
Copy link
Contributor

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.

Copy link
Contributor Author

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.
Copy link
Contributor

@whimboo whimboo left a 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.

@jgraham jgraham merged commit 8d1c8ad into master Aug 1, 2023
32 of 34 checks passed
@jgraham jgraham deleted the firefox_stability_fix branch August 1, 2023 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra webdriver wg-testing_browser wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants