-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix CI flakiness: MSB4216 task host failures, dotnet-watch hangs, NuGet errors #53424
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
Open
mmitche
wants to merge
6
commits into
main
Choose a base branch
from
fix/ci-flakiness/main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+93
−35
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
189c634
Fix CI flakiness: 5 root causes addressing 48% failure rate
mmitche 3ecb050
Revert dotnet-watch changes in favor of tmat's fix in PR #53271
mmitche 842031e
Merge upstream/main to pick up tmat's dotnet-watch fix (#53271) and o…
mmitche fccc655
Trigger CI build #1 after merge from main
mmitche 5be6d9e
Trigger CI build #2 - streak: 1/25
mmitche cdf5d19
Trigger CI build #3 - streak: 2/25
mmitche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,10 @@ set DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\d | |
| set PATH=%DOTNET_ROOT%;%PATH% | ||
| set TestFullMSBuild=%1 | ||
|
|
||
| REM Set DOTNET_HOST_PATH so MSBuild task hosts can locate the dotnet executable. | ||
| REM Without this, tasks from NuGet packages that use TaskHostFactory fail with MSB4216. | ||
| set DOTNET_HOST_PATH=%DOTNET_ROOT%\dotnet.exe | ||
|
|
||
| REM Ensure Visual Studio instances allow preview SDKs | ||
| PowerShell -ExecutionPolicy ByPass -NoProfile -File "%HELIX_CORRELATION_PAYLOAD%\t\eng\enable-preview-sdks.ps1" | ||
|
|
||
|
|
@@ -35,14 +39,16 @@ dotnet new --debug:ephemeral-hive | |
| dotnet nuget list source --configfile %TestExecutionDirectory%\nuget.config | ||
| if exist %TestExecutionDirectory%\Testpackages dotnet nuget add source %TestExecutionDirectory%\Testpackages --name testpackages --configfile %TestExecutionDirectory%\nuget.config | ||
|
|
||
| dotnet nuget remove source dotnet6-transport --configfile %TestExecutionDirectory%\nuget.config | ||
| dotnet nuget remove source dotnet6-internal-transport --configfile %TestExecutionDirectory%\nuget.config | ||
| dotnet nuget remove source dotnet7-transport --configfile %TestExecutionDirectory%\nuget.config | ||
| dotnet nuget remove source dotnet7-internal-transport --configfile %TestExecutionDirectory%\nuget.config | ||
| dotnet nuget remove source richnav --configfile %TestExecutionDirectory%\nuget.config | ||
| dotnet nuget remove source vs-impl --configfile %TestExecutionDirectory%\nuget.config | ||
| dotnet nuget remove source dotnet-libraries-transport --configfile %TestExecutionDirectory%\nuget.config | ||
| dotnet nuget remove source dotnet-tools-transport --configfile %TestExecutionDirectory%\nuget.config | ||
| dotnet nuget remove source dotnet-libraries --configfile %TestExecutionDirectory%\nuget.config | ||
| dotnet nuget remove source dotnet-eng --configfile %TestExecutionDirectory%\nuget.config | ||
| REM Remove feeds not needed for tests. Errors from non-existent sources | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any idea which feeds remain? maybe we should have a separate nuget.config just for the tests
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it just updated comments here. |
||
| REM (e.g. internal-transport feeds only present in internal builds) are ignored. | ||
| dotnet nuget remove source dotnet6-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul | ||
| dotnet nuget remove source dotnet6-internal-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul | ||
| dotnet nuget remove source dotnet7-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul | ||
| dotnet nuget remove source dotnet7-internal-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul | ||
| dotnet nuget remove source richnav --configfile %TestExecutionDirectory%\nuget.config 2>nul | ||
| dotnet nuget remove source vs-impl --configfile %TestExecutionDirectory%\nuget.config 2>nul | ||
| dotnet nuget remove source dotnet-libraries-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul | ||
| dotnet nuget remove source dotnet-tools-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul | ||
| dotnet nuget remove source dotnet-libraries --configfile %TestExecutionDirectory%\nuget.config 2>nul | ||
| dotnet nuget remove source dotnet-eng --configfile %TestExecutionDirectory%\nuget.config 2>nul | ||
| dotnet nuget list source --configfile %TestExecutionDirectory%\nuget.config | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,21 @@ | ||
| <!-- Prevent test asset projects from picking up the repo's root Directory.Build.targets. --> | ||
| <Project> | ||
|
|
||
| <!-- For packable Exe projects (DotNetCliToolReference tools targeting netcoreapp2.2), | ||
| include the auto-generated runtimeconfig.json in the NuGet package so the dotnet | ||
| host can find it adjacent to the DLL. This enables RollForward=LatestMajor to | ||
| work correctly, allowing tools to run on machines that only have .NET 6.0+ | ||
| installed (common on Helix CI agents that lack .NET Core 2.2). Without this, | ||
| tools fail with FrameworkMissingFailure (exit code 0x80008096) because the host | ||
| cannot roll forward from 2.2.0 without a runtimeconfig.json specifying the | ||
| rollForward policy. --> | ||
| <Target Name="IncludeRuntimeConfigInPackage" | ||
| AfterTargets="Build" | ||
| Condition="'$(OutputType)' == 'Exe' AND '$(IsPackable)' == 'true' AND '$(GenerateRuntimeConfigurationFiles)' != 'false'"> | ||
| <ItemGroup> | ||
| <BuildOutputInPackage Include="$(ProjectRuntimeConfigFilePath)" | ||
| Condition="'$(ProjectRuntimeConfigFilePath)' != '' AND Exists('$(ProjectRuntimeConfigFilePath)')" /> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| </Project> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ViktorHofer does this make sense?