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

Remove selenium-standalone; update Selenium.WebDriver #51775

Merged
merged 6 commits into from
Oct 31, 2023

Conversation

SteveSandersonMS
Copy link
Member

@SteveSandersonMS SteveSandersonMS commented Oct 31, 2023

Eliminates the Node-based selenium-standalone, and switches over to the newer Selenium Manager which has been built into Selenium since about a year ago.

In theory this should mean it takes care of acquiring an up-to-date version of ChromeDriver on its own. It also means we can remove a lot of code that was interacting with selenium-standalone to start and stop it.

I've also taken the opportunity to remove the redundant Sauce-related code from Components E2E, but left it alone for SignalR tests since it still seems to be used there.

Works fine locally, but let's see how it goes in CI... Update: It's passed all the E2E tests 3 times in a row (except the one I deliberately made fail to check that failures are reported) so it does seem good.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Oct 31, 2023
@ghost ghost added this to the 8.0.x milestone Oct 31, 2023
@ghost
Copy link

ghost commented Oct 31, 2023

Hi @SteveSandersonMS. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@ghost
Copy link

ghost commented Oct 31, 2023

Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at.

@SteveSandersonMS SteveSandersonMS changed the title Remove selenium-standalone Remove selenium-standalone; update Selenium.WebDriver Oct 31, 2023
{
"drivers": {
"chrome": {
"version" : "114.0.5735.90"
Copy link
Member Author

Choose a reason for hiding this comment

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

In theory we no longer have to configure this or keep updating it manually.

We do still have to update SeleniumWebDriverVersion in Versions.props on a regular cadence, since even though it can acquire newer ChromeDriver versions on its own, it still has to be an up-to-date Selenium.WebDriver NuGet package in order to support those newer versions.

@SteveSandersonMS SteveSandersonMS marked this pull request as ready for review October 31, 2023 14:36
@SteveSandersonMS SteveSandersonMS requested review from a team and wtgodbe as code owners October 31, 2023 14:36
@SteveSandersonMS
Copy link
Member Author

@wtgodbe I think this should go into release/8.0 because otherwise soon we won't be able to run the E2E tests for servicing 8.0, as Chrome will keep updating. Once it merges into release/8.0 it can be ported to main too.

Does that sound OK to you? Do we need shiproom approval to make a build-infra-only change?

@javiercn
Copy link
Member

@SteveSandersonMS thanks steve!

This is great! I was running into issues with the E2E tests crashing in the past in my other update attempts.

@javiercn
Copy link
Member

Build infrastructure changes are tell-mode only

@SteveSandersonMS SteveSandersonMS added the tell-mode Indicates a PR which is being merged during tell-mode label Oct 31, 2023
@SteveSandersonMS
Copy link
Member Author

Thanks @javiercn.

The CI failure here is unrelated to this change, and it's tell-mode, so merging.

@SteveSandersonMS SteveSandersonMS merged commit 892b10b into release/8.0 Oct 31, 2023
23 of 26 checks passed
@SteveSandersonMS SteveSandersonMS deleted the stevesa/goodbye-selenium-standalone branch October 31, 2023 15:32
@ghost ghost modified the milestones: 8.0.x, 8.0.0 Oct 31, 2023
@SteveSandersonMS
Copy link
Member Author

/backport to main

Copy link
Contributor

Started backporting to main: https://github.com/dotnet/aspnetcore/actions/runs/6708840327

Copy link
Contributor

@SteveSandersonMS backporting to main failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Delete Selenium Standalone references
Using index info to reconstruct a base tree...
M	src/Components/test/E2ETest/package.json
M	src/Components/test/E2ETest/yarn.lock
Falling back to patching base and 3-way merge...
Removing src/Shared/E2ETesting/SeleniumStandaloneServer.cs
CONFLICT (modify/delete): src/Components/test/E2ETest/yarn.lock deleted in Delete Selenium Standalone references and modified in HEAD. Version HEAD of src/Components/test/E2ETest/yarn.lock left in tree.
Removing src/Components/test/E2ETest/scripts/sauce.ts
CONFLICT (modify/delete): src/Components/test/E2ETest/package.json deleted in Delete Selenium Standalone references and modified in HEAD. Version HEAD of src/Components/test/E2ETest/package.json left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Delete Selenium Standalone references
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

@SteveSandersonMS an error occurred while backporting to main, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework tell-mode Indicates a PR which is being merged during tell-mode
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants