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

[wasm][xharness] install development SSL certificate on Helix agent before xharness run via SDK or powershell #53280

Merged
merged 6 commits into from
May 28, 2021

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented May 26, 2021

Caused by #53180, #53225

  • The original approach to install certificates didn't work because we don't have dotnet SDK, just runtime on Helix agents.
  • dotnet dev-certs https needs user interaction with a dialog. Instead, using powershelgl to install certs
  • Wasm.Build.Tests are being disabled here because of [wasm] Wasm.Build.Tests failing #53405

Fixes #53207

@ghost
Copy link

ghost commented May 26, 2021

Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

Caused by #53180, #53225
The original approach to install certificates didn't work because we don't have dotnet SDK, just runtime on windows.
Fixes #53207

Author: pavelsavara
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@pavelsavara
Copy link
Member Author

/azp run runtime-libraries-mono outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime-libraries-mono outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime-libraries-mono outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara pavelsavara requested review from radical and premun May 26, 2021 16:47
@pavelsavara pavelsavara marked this pull request as ready for review May 26, 2021 16:47
@pavelsavara
Copy link
Member Author

/azp run runtime-libraries-mono outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara pavelsavara requested a review from radical May 26, 2021 18:10
@pavelsavara
Copy link
Member Author

/azp run runtime-libraries-mono outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@radical
Copy link
Member

radical commented May 26, 2021

Browser windows:

C:\helix\work\workitem>dotnet dev-certs https   && call RunTests.cmd 

...
[EXECUTION TIMED OUT]
Exit Code:-3Executor timed out after 1800 seconds and was killed

['Microsoft.Extensions.Configuration.EnvironmentVariables.Tests' WORK ITEM LOG TRUNCATED: Command timed out, and was killed]

@pavelsavara
Copy link
Member Author

/azp run runtime-libraries-mono outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ericstj
Copy link
Member

ericstj commented May 27, 2021

Not sure if this PR will fix it, but noticing lots of failures of the form:

Connection refused [::ffff:127.0.0.1]:43699 (localhost:43699)
...
Starting ChromeDriver 84.0.4147.0 (ff714bcb10c3356b1b1b2819148507a34fa4b1f8-refs/heads/master@{#768968}) on port 43699
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
Connection refused [::ffff:127.0.0.1]:43699 (localhost:43699)
ChromeDriver was started successfully.
Connection refused [::ffff:127.0.0.1]:43699 (localhost:43699)
[04:59:16] crit: System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.
                 To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.
                 For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
                    at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions, Action`1 configureOptions)
                    at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions)
                    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context)
                    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context)
                    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
                    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
                    at Microsoft.AspNetCore.Hosting.WebHost.StartAsync(CancellationToken cancellationToken)
                    at Microsoft.DotNet.XHarness.CLI.Commands.WebServer.Start(TestCommandArguments arguments, ILogger logger, Func`2 onConsoleConnected, CancellationToken token) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WebServer.cs:line 71
                    at Microsoft.DotNet.XHarness.CLI.Commands.Wasm.WasmBrowserTestRunner.RunTestsWithWebDriver(DriverService driverService, IWebDriver driver) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmBrowserTestRunner.cs:line 60
                    at Microsoft.DotNet.XHarness.CLI.Commands.Wasm.WasmTestBrowserCommand.InvokeInternal(ILogger logger) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmTestBrowserCommand.cs:line 73
                    at Microsoft.DotNet.XHarness.Common.CLI.Commands.XHarnessCommand.Invoke(IEnumerable`1 arguments) in /_/src/Microsoft.DotNet.XHarness.Common/CLI/Commands/XHarnessCommand.cs:line 120
XHarness exit code: 71 (GENERAL_FAILURE)

Here: https://dev.azure.com/dnceng/public/_build/results?buildId=1158915&view=ms.vss-test-web.build-test-results-tab&runId=34978388&paneView=debug

https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-53212-merge-53c30b46d5f14dc0b0/XsltCompiler.Tests/console.a4a5589c.log?sv=2019-07-07&se=2021-06-16T04%3A55%3A12Z&sr=c&sp=rl&sig=ZTsowdh4FokJOmTDEzlrz04dVXOJpWfNSu0XOkzmOmA%3D
https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-53212-merge-53c30b46d5f14dc0b0/System.IO.Tests/console.72e792b5.log?sv=2019-07-07&se=2021-06-16T04%3A55%3A12Z&sr=c&sp=rl&sig=ZTsowdh4FokJOmTDEzlrz04dVXOJpWfNSu0XOkzmOmA%3D

@pavelsavara
Copy link
Member Author

/azp run runtime-libraries-mono outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara pavelsavara changed the title [wasm][xharness] install development SSL certificate on Helix agent before xharness run via SDK [wasm][xharness] install development SSL certificate on Helix agent before xharness run via SDK or powershell May 27, 2021
Copy link
Member

@premun premun left a comment

Choose a reason for hiding this comment

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

I hope this doesn't bite anyone because there will be a different SDK/runtime but I guess we only use it to start XHarness, right?

@pavelsavara pavelsavara force-pushed the pr_helix_install_dev_cert4 branch from 1cd915c to 802d62c Compare May 27, 2021 10:59
@pavelsavara pavelsavara force-pushed the pr_helix_install_dev_cert4 branch from e85867a to dfba946 Compare May 27, 2021 16:28
@pavelsavara
Copy link
Member Author

Last failure was in Wasm.Build.Tests

  Starting:    Wasm.Build.Tests (parallel test collections = on, max threads = 2)
    Wasm.Build.Tests.InvariantGlobalizationTests.RelinkingWithoutAOT [STARTING]
    Wasm.Build.Tests.MainWithArgsTests.TopLevelWithArgs [STARTING]
============== DELETING THE BUILDS =============
============== DELETING THE BUILDS =============
    Wasm.Build.Tests.InvariantGlobalizationTests.RelinkingWithoutAOT [FAIL]
      System.TypeInitializationException : The type initializer for 'Wasm.Build.Tests.BuildTestBase' threw an exception.
      ---- System.TypeLoadException : Could not load type 'System.IO.DirectoryInfo' from assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
      Stack Trace:
        /_/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs(123,0): at Wasm.Build.Tests.BuildTestBase.ConfigWithAOTData(Boolean aot)
        /_/src/tests/BuildWasmApps/Wasm.Build.Tests/MainWithArgsTests.cs(22,0): at Wasm.Build.Tests.MainWithArgsTests.MainWithArgsTestData(Boolean aot, RunHost host)

https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-53280-merge-607faae452b9457aa6/Wasm.Build.Tests/console.370f3b8e.log?sv=2019-07-07&se=2021-06-16T14%3A34%3A05Z&sr=c&sp=rl&sig=Xyb%2BqNpGVBevJ95zRErg9Y0xjZku759MvDVGK2lJTD4%3D

@radical radical force-pushed the pr_helix_install_dev_cert4 branch from dfba946 to eba9934 Compare May 27, 2021 19:01
radical added 3 commits May 27, 2021 15:54
.. because `dotnet dev-certs https` shows a dialog on windows, which
would require user interaction.
@radical radical requested review from premun, lewing and akoeplinger May 28, 2021 04:17
@radical
Copy link
Member

radical commented May 28, 2021

Installer test failure: Bundle_Is_Extracted

System.ComponentModel.Win32Exception : Text file busy

Stack trace
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Microsoft.DotNet.Cli.Build.Framework.Command.Start() in /_/src/installer/tests/TestUtils/Command.cs:line 199
   at Microsoft.DotNet.Cli.Build.Framework.Command.Execute(Boolean fExpectedToFail) in /_/src/installer/tests/TestUtils/Command.cs:line 239
   at Microsoft.DotNet.Cli.Build.Framework.Command.Execute() in /_/src/installer/tests/TestUtils/Command.cs:line 171
   at AppHost.Bundle.Tests.NetCoreApp3CompatModeTests.Bundle_Is_Extracted() in /_/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/NetCoreApp3CompatModeTests.cs:line 33

Tracked at #43316 . This seems to be an intermittent error, and unrelated to this PR. Merging.

@radical radical merged commit 72936ec into dotnet:main May 28, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 27, 2021
@pavelsavara pavelsavara deleted the pr_helix_install_dev_cert4 branch July 29, 2021 08:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Addition of "dotnet dev-certs" command makes all WASM work items time out
4 participants