Skip to content

Try reenabling helix for components #18636

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

Closed
wants to merge 45 commits into from
Closed

Try reenabling helix for components #18636

wants to merge 45 commits into from

Conversation

HaoK
Copy link
Member

@HaoK HaoK commented Jan 28, 2020

No description provided.

@HaoK HaoK added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jan 28, 2020
@HaoK
Copy link
Member Author

HaoK commented Jan 30, 2020

@MattGal looks like our "--" might have broken the attachment in the work items for failing tests to the download, it always goes to an empty tab for me now :(

I thought java JDK was already installed in the past, at least in the comments of https://github.com/dotnet/core-eng/issues/5302

I assumed it would already be on the path for the helix work items, but I'm seeing java not found (when trying to install things from npm/yarn)

Copying C:\Users\runner\AppData\Local\Temp\nodejs\node-v10.15.3-win-x64\* to .
Node.exe copied to .
C:\h\w\A5E808F7\w\AEE809F1\e\yarn -> C:\h\w\A5E808F7\w\AEE809F1\e\node_modules\yarn\bin\yarn.js
C:\h\w\A5E808F7\w\AEE809F1\e\yarnpkg -> C:\h\w\A5E808F7\w\AEE809F1\e\node_modules\yarn\bin\yarn.js
+ [email protected]
added 1 package in 0.594s
yarn install v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ selenium-standalone install
not found: java
Usage: selenium-standalone action [options]
error Command failed with exit code 255.

@HaoK
Copy link
Member Author

HaoK commented Jan 31, 2020

@javiercn can you help me figure out how to get yarn working? Looks like its not a java on path issues since I manually downloaded and installed it, and yarn still fails to install selenium like so:

C:\h\w\989D0856\w\973D0894\e\yarnpkg -> C:\h\w\989D0856\w\973D0894\e\node_modules\yarn\bin\yarn.js
C:\h\w\989D0856\w\973D0894\e\yarn -> C:\h\w\989D0856\w\973D0894\e\node_modules\yarn\bin\yarn.js
+ [email protected]
added 1 package in 0.563s
yarn install v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ selenium-standalone install
not found: java
Usage: selenium-standalone action [options]
error Command failed with exit code 255.

"Java?"
Usage: java [options] <mainclass> [args...]
           (to execute a class)
   or  java [options] -jar <jarfile> [args...]
           (to execute a jar file)
   or  java [options] -m <module>[/<mainclass>] [args...]
       java [options] --module <module>[/<mainclass>] [args...]
           (to execute the main class in a module)
   or  java [options] <sourcefile> [args]
           (to execute a single source-file program)



@javiercn
Copy link
Member

can you help me figure out how to get yarn working? Looks like its not a java on path issues since I manually downloaded and installed it, and yarn still fails to install selenium like so:

I'm a bit confused, isn't that exactly what the build is complaining about? If you do java -v in the context where the build is run, does it succeed?

@HaoK
Copy link
Member Author

HaoK commented Jan 31, 2020

Oh i think I see the issue, the path isn't setup early enough

@HaoK
Copy link
Member Author

HaoK commented Feb 1, 2020

@javiercn getting closer, where's this config file coming from for the selenium, need to change where its looking on helix

yarn install v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ selenium-standalone install --config ../../../Shared/E2ETesting/selenium-config.json
Error parsing config file : Cannot find module 'C:\h\w\AC56097A\Shared\E2ETesting\selenium-config.json'
Usage: selenium-standalone action [options]
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@HaoK
Copy link
Member Author

HaoK commented Feb 4, 2020

@pranavkm looks like https://github.com/dotnet/aspnetcore/pull/18676/files change is making this harder for components to run on helix since its now looking for a relative path, can we do something to make this look for that config file in the local directory (just copy it over as part of build or something?)

@HaoK
Copy link
Member Author

HaoK commented Feb 4, 2020

@javiercn looks like the content root being generated at compile time is not going to work well on helix, can you look into a fix for this to work on helix, we control how the app is packaged and deployed so a relative path from the current directory should work I think?

<_Parameter2>$([MSBuild]::NormalizeDirectory('$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\BasicTestApp'))'))</_Parameter2>

The error at runtime is a directory not found:

  Error Message:
   System.IO.DirectoryNotFoundException : F:\workspace\_work\1\s\src\Components\test\testassets\TestServer\
  Stack Trace:
     at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root)
   at Microsoft.Extensions.Hosting.HostBuilder.CreateHostingEnvironment()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at TestServer.Program.BuildWebHost[TStartup](String[] args) in F:\workspace\_work\1\s\src\Components\test\testassets\TestServer\Program.cs:line 68
   at Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures.AspNetSiteServerFixture.CreateWebHost() in /_/src/Components/test/E2ETest/Infrastructure/ServerFixtures/AspNetSiteServerFixture.cs:line 37
   at Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures.WebHostServerFixture.StartAndGetRootUri() in /_/src/Components/test/E2ETest/Infrastructure/ServerFixtures/WebHostServerFixture.cs:line 17
   at Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures.ServerFixture.<.ctor>b__4_0() in /_/src/Components/test/E2ETest/Infrastructure/ServerFixtures/ServerFixture.cs:line 25

@javiercn
Copy link
Member

javiercn commented Feb 4, 2020

@javiercn looks like the content root being generated at compile time is not going to work well on helix, can you look into a fix for this to work on helix, we control how the app is packaged and deployed so a relative path from the current directory should work I think?

I think so, you could key that of from IsHelixBuild?

@HaoK
Copy link
Member Author

HaoK commented Feb 6, 2020

@javiercn
Copy link
Member

javiercn commented Feb 6, 2020

It seems is null refing here?

https://github.com/dotnet/aspnetcore/blob/master/src/Shared/E2ETesting/SeleniumStandaloneServer.cs#L202-L215

Not sure what can be causing it to fail there.

@javiercn
Copy link
Member

javiercn commented Feb 6, 2020

@HaoK are the agents persistent or are they transient, in the sense they get re-imagined/rebooted per run.

We could try and remove the process tracking logic.

@HaoK
Copy link
Member Author

HaoK commented Feb 6, 2020

@javiercn yeah i don't think we need process tracking logic at all on the helix agents, they shouldn't be getting reused

@javiercn
Copy link
Member

javiercn commented Feb 6, 2020

@javiercn yeah i don't think we need process tracking logic at all on the helix agents, they shouldn't be getting reused

I suggest we disable it then

@HaoK
Copy link
Member Author

HaoK commented Feb 6, 2020

Sounds good to me, can you just push onto this branch the removal of the process tracking stuff that you don't think we need?

@javiercn
Copy link
Member

javiercn commented Feb 6, 2020

@HaoK Is there a Helix env variable I can key this off?

@HaoK
Copy link
Member Author

HaoK commented Feb 6, 2020

Yeah just use

 if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))

@HaoK
Copy link
Member Author

HaoK commented Feb 19, 2020

branch looks messed up with builds not triggering, doing a merge/force push here @javiercn , just a heads up in case you have changes locally

@HaoK
Copy link
Member Author

HaoK commented Feb 19, 2020

@MattGal
Copy link
Member

MattGal commented Mar 11, 2020

@HaoK I'm unsubscribing from this thread as it's a bit noisy, but if you need my input on anything just let me know directly please.

@HaoK
Copy link
Member Author

HaoK commented Mar 11, 2020

@javiercn @pranavkm so it looks like installing yarn nukes npm, which then causes issues when selenium runs, any ideas how these two are supposedly to play together, what should the steps be on the helix side for things to be installed correctly? Right now I just tried using npm to install yarn, and then running yarn install, which looks like it works, but when the tests run selenium blows up because npm's cli gets nuked by yarn I think

@pranavkm
Copy link
Contributor

@HaoK
Copy link
Member Author

HaoK commented Mar 12, 2020

@pranavkm so looks like both yarn and npm are missing from node_modules after yarn install,

https://helix.dot.net/api/2019-06-17/jobs/877f305e-496c-4aea-a656-aec446c4ac16/workitems/Microsoft.AspNetCore.Components.E2ETests--netcoreapp5.0/files/console.37ab6af8.log

Any idea what nukes those?

@HaoK
Copy link
Member Author

HaoK commented Mar 14, 2020

Okay I think I got selenium working now, but the tests appear to be hanging, @pranavkm @javiercn can you guys tell what's going on from the exceptions, the screenshots are taken but its hanging so they don't get uploaded I think, I can try having the test directly write to the upload directory

https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-aspnetcore-refs-pull-18636-merge-6b03aadab2d64a749c/Microsoft.AspNetCore.Components.E2ETests--netcoreapp5.0/console.c865d749.log?sv=2019-02-02&se=2020-03-24T09%3A01%3A48Z&sr=c&sp=rl&sig=zt9RkAPid99FI6EIiNycGKQ6w5AJhHOCNCgYlbia3rk%3D

@HaoK
Copy link
Member Author

HaoK commented Apr 28, 2020

Replaced by #21280

@HaoK HaoK closed this Apr 28, 2020
@HaoK HaoK deleted the haok/helix-comp branch May 18, 2020 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants