Skip to content

Update selenium dependency versions #44834

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

Merged
merged 22 commits into from
Dec 15, 2022
Merged

Update selenium dependency versions #44834

merged 22 commits into from
Dec 15, 2022

Conversation

captainsafia
Copy link
Member

No description provided.

@captainsafia
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

Some big jumps. Hope they don't include breaking changes…

@dougbu
Copy link
Contributor

dougbu commented Nov 2, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@captainsafia
Copy link
Member Author

captainsafia commented Nov 3, 2022

Some big jumps. Hope they don't include breaking changes…

Yeah, it looks like the last time this was updated was August 1st so we're a little behind. Hopefully, not any breaking changes here...

@dougbu
Copy link
Contributor

dougbu commented Nov 3, 2022

Due to the https://github.com/dotnet/aspnetcore/blob/07a563e1ed6d443a8e8dce6c4fe78a6aad5302df/src/Components/test/E2ETest/.npmrc file, you'll need to get vsts-npm-auth and use vsts-npm-auth -C {that file} before running yarn install in that directory

@javiercn
Copy link
Member

javiercn commented Nov 3, 2022

Due to the https://github.com/dotnet/aspnetcore/blob/07a563e1ed6d443a8e8dce6c4fe78a6aad5302df/src/Components/test/E2ETest/.npmrc file, you'll need to get vsts-npm-auth and use vsts-npm-auth -C {that file} before running yarn install in that directory

Where are we supposed to run this?

@dougbu
Copy link
Contributor

dougbu commented Nov 3, 2022

Where are we supposed to run this?

In the same directory as that .npmrc and the changed package.json file.

@dougbu
Copy link
Contributor

dougbu commented Nov 3, 2022

The system automatically loads packages from upstream repositories into the one listed in the .npmrc file when an authorized person runs yarn install. That means only authorized people (like you) can change what we depend on.

It may also be necessary to clear your local yarn cache before installing and updating the lock file.

@javiercn
Copy link
Member

javiercn commented Nov 3, 2022

@dougbu what I meant is, does vsts-npm-auth need to go on a yarn YAML file?

@dougbu
Copy link
Contributor

dougbu commented Nov 3, 2022

No, execute it from the command line using the .npmrc file I mentioned. Then, you're authenticated and yarn install should do the right thing, assuming your cache is clear and you don't have a node_modules/ folder in the directory.

Not sure but always-auth=true may temporarily (don't check the change in) need to be added to the .npmrc file.

https://learn.microsoft.com/en-us/azure/devops/artifacts/tutorials/protect-oss-packages-with-upstream-sources?view=azure-devops&tabs=npm%2Cnpmrestore is pretty general but has a bit more context.

@dougbu
Copy link
Contributor

dougbu commented Nov 7, 2022

@captainsafia @javiercn where exactly is this PR❔ Do one of you already have updated lock files on your machines❔

@javiercn
Copy link
Member

javiercn commented Nov 7, 2022

@dougbu I do not 😢. Had to look into other build issues.

@dougbu
Copy link
Contributor

dougbu commented Nov 19, 2022

@dotnet/aspnet-blazor-eng I updated the lock files and we're getting further. But it appears the newer packages include a breaking change:

> selenium-standalone start --config /home/vsts/work/1/s/src/Shared/E2ETesting/selenium-config.json --javaArgs=-Dwebdriver.chrome.driver=/usr/local/share/chrome_driver/chromedriver -- -port 44457
[xUnit.net 00:00:02.56] Microsoft.AspNetCore.Components.E2ETests: 
[xUnit.net 00:00:02.83] Microsoft.AspNetCore.Components.E2ETests: Unrecognized option: -
[xUnit.net 00:00:02.83] Microsoft.AspNetCore.Components.E2ETests: Error: Could not create the Java Virtual Machine.
[xUnit.net 00:00:02.83] Microsoft.AspNetCore.Components.E2ETests: Error: A fatal exception has occurred. Program will exit.
[xUnit.net 00:00:03.27] Microsoft.AspNetCore.Components.E2ETests: /home/vsts/work/1/s/src/Components/test/E2ETest/node_modules/selenium-standalone/lib/check-started.js:44
[xUnit.net 00:00:03.27] Microsoft.AspNetCore.Components.E2ETests:       throw new Error(
[xUnit.net 00:00:03.27] Microsoft.AspNetCore.Components.E2ETests:             ^
[xUnit.net 00:00:03.27] Microsoft.AspNetCore.Components.E2ETests: 
[xUnit.net 00:00:03.27] Microsoft.AspNetCore.Components.E2ETests: Error: Selenium exited before it could start with code 1
[xUnit.net 00:00:03.27] Microsoft.AspNetCore.Components.E2ETests: Stdout: 
[xUnit.net 00:00:03.27] Microsoft.AspNetCore.Components.E2ETests: Stderr: 
[xUnit.net 00:00:03.27] Microsoft.AspNetCore.Components.E2ETests:     at checkStarted (/home/vsts/work/1/s/src/Components/test/E2ETest/node_modules/selenium-standalone/lib/check-started.js:44:13)
[xUnit.net 00:00:03.27] Microsoft.AspNetCore.Components.E2ETests:     at async Object.start (/home/vsts/work/1/s/src/Components/test/E2ETest/node_modules/selenium-standalone/lib/start.js:150:3)
[xUnit.net 00:00:03.27] Microsoft.AspNetCore.Components.E2ETests:     at async Object.start (/home/vsts/work/1/s/src/Components/test/E2ETest/node_modules/selenium-standalone/bin/selenium-standalone:23:16)

Didn't we hit something similar the last time we tried to move to a newer selenium-standalone❔

@BrennanConroy
Copy link
Member

This seems like something the @dotnet/aspnet-blazor-eng team should investigate and fix. It's gotten too complex for normal build-ops to try to figure out.

@@ -104,14 +104,18 @@ private static async Task InitializeInstance(ITestOutputHelper output)
var chromeDriverPathEnvVar = Environment.GetEnvironmentVariable("CHROMEWEBDRIVER");
if (!string.IsNullOrEmpty(chromeDriverPathEnvVar))
{
chromeDriverArg = $"--javaArgs=-Dwebdriver.chrome.driver={chromeDriverPathEnvVar}/chromedriver";
var configContent = File.ReadAllText(seleniumConfigPath);
Copy link
Member

Choose a reason for hiding this comment

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

FYI, this is working around what is likely a bug in selenium-standalone introduced by webdriverio/selenium-standalone@d13777c#diff-20cb449399750b160a4adfac13aa25ed97c9faacf30bee11ed4a16870f3ff4bfR103
It expands the individual characters of the command line argument for --javaArgs, so -Dblah becomes ['-','D','b','l','a','h'] which then fails since each value in the array is passed as an argument to java and - isn't a valid argument.

Might be worth filing an issue.

@TanayParikh
Copy link
Contributor

Made some additional bumps for Chrome 108 and associated selenium packages. Reverted the selenium-standalone bump for now.

@TanayParikh
Copy link
Contributor

Latest packages aren't available in our feeds, have reached out offline to the appropriate folks.

@TanayParikh
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@TanayParikh
Copy link
Contributor

Packages are now available. Lock files need updating now.

@TanayParikh
Copy link
Contributor

TanayParikh commented Dec 15, 2022

Progress?

Exception in thread "main" com.beust.jcommander.ParameterException: Was passed main parameter '--port' but no main parameter was defined in your arg class
	at com.beust.jcommander.JCommander.initMainParameterValue(JCommander.java:936)
	at com.beust.jcommander.JCommander.parseValues(JCommander.java:752)
	at com.beust.jcommander.JCommander.parse(JCommander.java:340)
	at com.beust.jcommander.JCommander.parse(JCommander.java:319)
	at org.openqa.grid.selenium.GridLauncherV3.parse(GridLauncherV3.java:218)
	at org.openqa.grid.selenium.GridLauncherV3.lambda$buildLaunchers$3(GridLauncherV3.java:241)
	at org.openqa.grid.selenium.GridLauncherV3.lambda$launch$0(GridLauncherV3.java:86)
	at java.base/java.util.Optional.map(Optional.java:265)
	at org.openqa.grid.selenium.GridLauncherV3.launch(GridLauncherV3.java:86)
	at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:70)
/home/vsts/work/1/s/src/Components/test/E2ETest/node_modules/selenium-standalone/lib/check-started.js:23
      throw new Error(`Selenium exited before it could start with code ${cpState.code}\n`);
            ^

I think this may be related to the arg parsing @BrennanConroy mentioned above.


Hmm I'm seeing:

selenium-standalone start --config /home/vsts/work/1/s/src/Components/test/E2ETest/bin/Release/net7.0/modifiedConfig.json -- --port 44615

But that looks like it's expected:

https://github.com/dotnet/aspnetcore/pull/44834/files#diff-220c96679ae5c8b66a7c08d0514422c79c41bbf522874580097ce4dd6b6d8f1eL114-R118

@BrennanConroy are you able to share some more context on your earlier change?

Taking a shot by reverting the --port to the original -port: 5624bc7

@TanayParikh
Copy link
Contributor

TanayParikh commented Dec 15, 2022

Okay, that worked, no more parameter error! Onto the next;

   System.InvalidOperationException : Couldn't create a Selenium remote driver client. The server is irresponsive
---- OpenQA.Selenium.WebDriverException : The newSession command returned an unexpected error. 
Selenium
Whoops! The URL specified routes to this help page.

For more information about Selenium please see the docs and/or visit the wiki. Or perhaps you are looking for the Selenium console.

Happy Testing!

So running into some routing issue now.


Reverted the selenium standalone workaround.

This reverts commit 1a81a40.
@BrennanConroy
Copy link
Member

are you able to share some more context on your earlier change?

#44834 (comment)

dotnet-maestro bot added a commit that referenced this pull request Dec 15, 2022
[main] Update dependencies from dotnet/efcore dotnet/runtime


 - Update templatestrings.json files

 - Update template.json files

 - Update other references to net7

 - Rename publicApi folders

 - Fix RepoTasks

 - Fix it more fixily

 - Really fix it for real this time

 - Undo PreviewFeatures changes

 - Using

 - Merge branch 'darc-main-8caa276f-464b-4e95-a7fa-bc264a536653' of https://github.com/dotnet/aspnetcore into darc-main-8caa276f-464b-4e95-a7fa-bc264a536653

 - Tasks

 - IO

 - CTS

 - Net70

 - Merge branch 'darc-main-8caa276f-464b-4e95-a7fa-bc264a536653' of https://github.com/dotnet/aspnetcore into darc-main-8caa276f-464b-4e95-a7fa-bc264a536653

 - Try using net8.0 for HelixTestRunner

 - Try making ReferenceAssemblies

 - Merge branch 'darc-main-8caa276f-464b-4e95-a7fa-bc264a536653' of https://github.com/dotnet/aspnetcore into darc-main-8caa276f-464b-4e95-a7fa-bc264a536653

 - Get analyzer tests working

 - Ok fine

 - Update doc

 - Path combine

 - Try somethin wacky

 - Fix

 - Using

 - Merge remote-tracking branch 'upstream/main' into darc-main-8caa276f-464b-4e95-a7fa-bc264a536653

 - Quarantine regressed WriteAsJsonAsync tests #45557

 - Quarantine regressed async Json test #45557

 - Re-order DataAnnotationsMetadataProviderTest expected results

 - Quarantine regressed async Json test #45557

 - Re-order DataAnnotationsMetadataProviderTest expected results

 - Merge remote-tracking branch 'upstream/main' into darc-main-8caa276f-464b-4e95-a7fa-bc264a536653

 - Bump E2E timeout to 2 hours

Per discussion in #44834 (comment)

 - React to enum ordering change

 - Merge remote-tracking branch 'upstream/darc-main-8caa276f-464b-4e95-a7fa-bc264a536653' into darc-main-8caa276f-464b-4e95-a7fa-bc264a536653

 - Skip a microbenchmark, update a version

 - Make test resilient to order changes

 - Unquar tests

 - remove custom loader for .wasm file (#45611)
@TanayParikh
Copy link
Contributor

image

🤞 that should do it

@TanayParikh
Copy link
Contributor

image

🎉

Going to auto-merge this now that it's green. Feel free to reach out if anybody has any questions or concerns.

@TanayParikh TanayParikh enabled auto-merge (squash) December 15, 2022 22:20
@sebastienros
Copy link
Member

Awesome work @TanayParikh 👏👏👏

@TanayParikh TanayParikh merged commit 9c25786 into main Dec 15, 2022
@TanayParikh TanayParikh deleted the safia/update-selenium branch December 15, 2022 23:14
@ghost ghost added this to the 8.0-preview1 milestone Dec 15, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants