Reduce Windows PR validation time: Helix, parallel test collections, pwsh#703
Reduce Windows PR validation time: Helix, parallel test collections, pwsh#703Copilot wants to merge 20 commits into
Conversation
… split - Switch powershell.exe to pwsh in DotNetCommand.cs (faster startup) - Create InstallScriptTestBase.cs abstract base class with shared data/helpers - Refactor GivenThatIWantToInstallDotnetFromAScript to extend base (SDK tests only) - Add GivenThatIWantToInstallDotnetRuntimeFromAScript as separate xunit collection - Add xunit.runner.json with explicit parallel collection settings - Split Windows pipeline job into Validation (30min) and Installation (60min) parallel jobs Agent-Logs-Url: https://github.com/dotnet/install-scripts/sessions/1e4f64e5-b501-42eb-bfc5-0862d29419e1 Co-authored-by: ellahathaway <67609881+ellahathaway@users.noreply.github.com>
… to .gitignore Agent-Logs-Url: https://github.com/dotnet/install-scripts/sessions/1e4f64e5-b501-42eb-bfc5-0862d29419e1 Co-authored-by: ellahathaway <67609881+ellahathaway@users.noreply.github.com>
To me, this is an indicator that Helix should be utilized instead. The is less overhead w/Helix. |
Replace separate Windows, Linux, and macOS pipeline jobs with a single job that sends tests to Helix across all three platforms. Tests run on Windows.10.Amd64.Open, Ubuntu.2204.Amd64.Open, and OSX.15.ARM64.Open queues. - Add HELIX_CORRELATION_PAYLOAD support to GetRepoRoot() for script path resolution on Helix machines - Move chmod +x logic into DotNetCommand.ExecuteInstallation() so tests handle permissions themselves on non-Windows - Add Verify snapshot fallback to AppContext.BaseDirectory for Helix - Include Assets/*.verified.txt as Content items in test project
Use sequence key-value syntax for job variables to match what eng/common/templates/job/job.yml expects at line 113.
- Use 'powershell' instead of 'pwsh' (not available on Helix Windows) - Add XUnitWorkItemTimeout of 30 minutes for integration tests - Suppress NETSDK1023 (Helix SDK implicit test refs) and xUnit1026 (pre-existing unused parameter warnings)
|
@copilot resolve the merge conflicts in this pull request |
Resolve conflicts: - .gitignore: keep .nuget/ (directory) as it's more comprehensive - azure-pipelines-PR.yml: keep Helix-based approach - GivenThatIWantToInstallDotnetFromAScript.cs: keep refactored version (extending InstallScriptTestBase, runtime tests in separate class) Also incorporate from main: - Assert.SkipWhen/SkipUnless instead of early-return patterns (xunit v3) - HashSet deduplication in InstallRuntimeFromChannelTestCases - #pragma warning disable xUnit1026 for unused versionRegex params Co-authored-by: ellahathaway <67609881+ellahathaway@users.noreply.github.com>
…eduplication - Remove `using Xunit.Abstractions` from new test files (xunit v3 exposes ITestOutputHelper directly via `using Xunit`) - Use Assert.SkipWhen/SkipUnless instead of early-return guards in GivenThatIWantToInstallDotnetRuntimeFromAScript.cs - Add HashSet deduplication in InstallScriptTestBase.InstallRuntimeFromChannelTestCases - Add #pragma warning disable xUnit1026 for unused versionRegex params Agent-Logs-Url: https://github.com/dotnet/install-scripts/sessions/d783e1ab-5163-4ed0-9047-991462c67eb9 Co-authored-by: ellahathaway <67609881+ellahathaway@users.noreply.github.com>
Resolved in commit bd7fa02. The merge incorporated the following from
Conflicts resolved:
Agreed. The PR was updated in commit |
ellahathaway
left a comment
There was a problem hiding this comment.
@copilot - PR validation is failing with the following error:
D:\a\_work\1\s\.dotnet\sdk\10.0.106\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file 'D:\a\_work\1\s\artifacts\obj\Install-Scripts.Test\project.assets.json' doesn't have a target for 'net8.0'. Ensure that restore has run and that you have included 'net8.0' in the TargetFrameworks for your project. [D:\a\_work\1\s\tests\Install-Scripts.Test\Install-Scripts.Test.csproj]
We've moved to .NET 10, so please address the failure accordingly.
The project targets net10.0 (per global.json and Install-Scripts.Test.csproj) but azure-pipelines-PR.yml still referenced net8.0 for XUnitPublishTargetFramework and DotNetCliVersion, causing the assets file error during Helix publish. Agent-Logs-Url: https://github.com/dotnet/install-scripts/sessions/fab58547-fdf3-4709-9daf-73aae61eabab Co-authored-by: ellahathaway <67609881+ellahathaway@users.noreply.github.com>
Fixed in e06dc2e. The Helix configuration in
|
Use build.ubuntu.2204.amd64.open instead of Ubuntu.2204.Amd64.open to match the actual image name in the NetCore-Public pool. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The send-to-helix template creates SendToHelix.binlog inside the source directory while simultaneously trying to zip that directory as the Helix payload, causing an IOException on Windows. Fix by staging repo files (excluding .git, artifacts, .dotnet) to a temp directory and pointing WorkItemDirectory there. Also fixes the Unix WorkItemCommand (already corrected to ./build.sh --test). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PowerShell doesn't search the current directory by default, so use explicit relative path like the Unix job does with ./build.sh. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Zip archives don't preserve Unix execute permissions. When the Helix SDK extracts the payload on Linux/macOS, all .sh files lose their execute bit. Add a pre-command to restore permissions before the work item runs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0f1ded6 to
0d4573e
Compare
The main branch runs tests on macOS-latest (x64). Using OSX.15.ARM64.Open caused failures because old .NET SDK channels (2.1.x, 2.2.x, etc.) never shipped ARM64 macOS builds. Switch to OSX.14.Amd64.Open for parity. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Instead of sending all tests as a single work item (which timed out on Windows after 30 minutes), split into one work item per test class: - Windows: 5 work items (AkaMsLinks, SdkLinks, InstallDotnet, InstallRuntime, WindowsTar) - Unix: 5 work items (AkaMsLinks, BashTar, SdkLinks, InstallDotnet, InstallRuntime) Each work item runs Build.cmd/build.sh --test with a class filter via TestRunnerAdditionalArguments env var, avoiding cmd.exe %20 escaping issues. Also upgrades Windows queue from Windows.10 (Server 2016) to Windows.11. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
powershell.exe→pwshinDotNetCommand.csInstallScriptTestBase.csabstract base classGivenThatIWantToInstallDotnetFromAScript.csto extendInstallScriptTestBaseGivenThatIWantToInstallDotnetRuntimeFromAScript.csfor runtime tests (parallel collection)xunit.runner.jsonto explicitly configure parallel test collection executionazure-pipelines-PR.ymlto use Helix for all platformsazure-pipelines-PR.yml: updatenet8.0→net10.0,8.0.126→10.0.106to match the project's target framework