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 components-e2e logging issues #54556

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

MackinnonBuck
Copy link
Member

@MackinnonBuck MackinnonBuck commented Mar 15, 2024

Since #54483 was merged, logs for the components-e2e pipeline has increased to 600MB+ in size on successful runs. Furthermore, there have been multiple recent failures in that pipeline with the following stack trace:

/home/vsts/work/1/s/.dotnet/sdk/9.0.100-preview.3.24161.2/Microsoft.TestPlatform.targets(46,5): error MSB4018: The "VSTestTask2" task failed unexpectedly. [/home/vsts/work/1/s/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj]
/home/vsts/work/1/s/.dotnet/sdk/9.0.100-preview.3.24161.2/Microsoft.TestPlatform.targets(46,5): error MSB4018: System.IndexOutOfRangeException: Index was outside the bounds of the array. [/home/vsts/work/1/s/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj]
/home/vsts/work/1/s/.dotnet/sdk/9.0.100-preview.3.24161.2/Microsoft.TestPlatform.targets(46,5): error MSB4018:    at Microsoft.TestPlatform.Build.Tasks.VSTestTask2.LogEventsFromTextOutput(String singleLine, MessageImportance messageImportance) in /_/src/Microsoft.TestPlatform.Build/Tasks/VSTestTask2.cs:line 67 [/home/vsts/work/1/s/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj]
/home/vsts/work/1/s/.dotnet/sdk/9.0.100-preview.3.24161.2/Microsoft.TestPlatform.targets(46,5): error MSB4018:    at Microsoft.Build.Utilities.ToolTask.LogMessagesFromStandardErrorOrOutput(Queue dataQueue, ManualResetEvent dataAvailableSignal, MessageImportance messageImportance, StandardOutputOrErrorQueueType queueType) [/home/vsts/work/1/s/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj]
/home/vsts/work/1/s/.dotnet/sdk/9.0.100-preview.3.24161.2/Microsoft.TestPlatform.targets(46,5): error MSB4018:    at Microsoft.Build.Utilities.ToolTask.HandleToolNotifications(Process proc) [/home/vsts/work/1/s/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj]
/home/vsts/work/1/s/.dotnet/sdk/9.0.100-preview.3.24161.2/Microsoft.TestPlatform.targets(46,5): error MSB4018:    at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [/home/vsts/work/1/s/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj]
/home/vsts/work/1/s/.dotnet/sdk/9.0.100-preview.3.24161.2/Microsoft.TestPlatform.targets(46,5): error MSB4018:    at Microsoft.Build.Utilities.ToolTask.Execute() [/home/vsts/work/1/s/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj]
/home/vsts/work/1/s/.dotnet/sdk/9.0.100-preview.3.24161.2/Microsoft.TestPlatform.targets(46,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/vsts/work/1/s/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj]
/home/vsts/work/1/s/.dotnet/sdk/9.0.100-preview.3.24161.2/Microsoft.TestPlatform.targets(46,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/home/vsts/work/1/s/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj]

Disabling the new TerminalLogger (which is on by default in .NET 9) seems to have resolved both the log size and test pipeline failure issues.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Mar 15, 2024
@MackinnonBuck MackinnonBuck marked this pull request as ready for review March 15, 2024 18:03
@MackinnonBuck MackinnonBuck requested review from wtgodbe and a team as code owners March 15, 2024 18:03
@MackinnonBuck
Copy link
Member Author

cc @nohwnd - it looks like the exception originates from here. Do you think this may be due to the changes in microsoft/vstest#4877?

@MackinnonBuck MackinnonBuck merged commit c5f6624 into main Mar 15, 2024
26 checks passed
@MackinnonBuck MackinnonBuck deleted the mbuck/fix-components-pipeline branch March 15, 2024 21:59
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0-preview3 milestone Mar 15, 2024
@nohwnd
Copy link
Member

nohwnd commented Mar 20, 2024

@MackinnonBuck I am having a look, I will put more info in this issue if needed microsoft/vstest#4938. The log size increase is because we are writing all captured outputs from passed tests. This is different from before, where by default we don't write passed tests at all. I though this would be useful, but its probably more problems than gains, will revert.

Then index problem I will have to debug, some info is missing there, and the code is not particularly robust.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants