[automated] Merge branch 'main' => 'release/dnup'#54734
Open
github-actions[bot] wants to merge 1082 commits into
Open
[automated] Merge branch 'main' => 'release/dnup'#54734github-actions[bot] wants to merge 1082 commits into
github-actions[bot] wants to merge 1082 commits into
Conversation
Resolves the four explicit TODOs in the Microsoft.Testing.Platform pipe protocol implementation called out in PR #50625's follow-up review, and hardens handshake message handling. Changes in src/Cli/dotnet/Commands/Test/MTP/TestApplication.cs: - 'RunAsync' is now guarded with an 'Interlocked.Exchange' so callers can no longer invoke it more than once on the same instance. - Reworded the 'GetSupportedProtocolVersion' comment to explain why we return an empty string instead of throwing: it lets the handler surface a structured 'HandshakeFailure' rather than crashing the process via 'FailFast' in 'OnRequest'. Changes in src/Cli/dotnet/Commands/Test/MTP/TestApplicationHandler.cs: - 'OnHandshakeReceived' no longer throws 'KeyNotFoundException' when 'SupportedProtocolVersions' is missing entirely. A new resource 'DotnetTestMissingHandshakeProtocolVersions' surfaces that case distinctly from 'DotnetTestIncompatibleHandshakeVersion'. - Added a 'GetRequiredHandshakeProperty' helper used by 'ExecutionId', 'Architecture', 'Framework', 'HostType', and 'InstanceId', replacing direct dictionary indexing that would throw KeyNotFoundException. - 'OnFileArtifactsReceived' validates 'FullPath' is non-empty instead of using the '!' null-suppression operator. - 'OnSessionEventReceived' now rejects messages received in help mode (same pattern as other handlers) and validates 'SessionUid'. Added resources in CliCommandStrings.resx: - 'DotnetTestMissingHandshakeProtocolVersions' - 'DotnetTestMissingRequiredMessageProperty' - 'RunAsyncCalledMoreThanOnce' xlf files were regenerated by the build (state='new'). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Consolidate runner-name matching in global.json branch via TryResolveRunner helper to avoid duplicating the case-insensitive comparisons. - Make pre-existing global.json tests hermetic by passing an explicit testRunnerEnvironmentValue: null so they cannot be silently disabled by a DOTNET_TEST_RUNNER value set in the developer/CI environment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Round 2: - Route missing/empty required handshake properties through HandshakeFailure instead of throwing (which previously caused FailFast). - Reject mismatching handshake info via HandshakeFailure rather than throwing. - Validate non-nullable required properties on TestResultMessages (InstanceId, Uid, DisplayName) with structured error; null-safe Exceptions. - Validate FileArtifactMessage.FullPath. - Reject TestSessionEvent without SessionType, validate SessionUid, and surface unknown event types via a localized error instead of an ArgumentOutOfRangeException. - Reject duplicate handshake on the same pipe connection. - Guard TestApplication.RunAsync against being invoked more than once. Round 3: - OnHandshakeReceived now returns bool. When the handler rejects the handshake (unsupported version, missing required properties, mismatching info, ...) TestApplication.OnRequest replies with an empty negotiated version so Microsoft.Testing.Platform stops sending further messages on the connection. This avoids a cascade of KeyNotFoundException / NullReferenceException in TerminalTestReporter (which only indexes _assemblies[executionId] after a TestHost handshake has been recorded). - Move InstanceId validation in front of the _handshakeInfo write so a failed TestHost handshake leaves the handler state clean. - Validate top-level ExecutionId on every non-handshake message before comparing it to the handshake's ExecutionId. - Validate DiscoveredTestMessage.Uid / DisplayName. - Guard discovery / result / artifact handlers with _receivedTestHostHandshake so a non-TestHost handshake cannot lead the terminal reporter into an unkeyed _assemblies lookup. - Reword DotnetTestMissingRequiredMessageProperty to "missing or empty". Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
The underlying infrastructure issue (Helix installing the x64 .NET runtime on arm64 macOS machines, causing 'incompatible architecture' dlopen failures when running multi-TFM tests against the previous .NET runtime) was fixed in eng/restore-toolset.sh by commits 6d4031f (Rosetta 2 detection + reinstall) and bba0cc1 (use TARGET_ARCHITECTURE for cross-arch installs). This re-enables the remaining dotnet test tests that were skipped on OSX because of that infrastructure issue: - GivenDotnetTestBuildsAndDiscoversTests.DiscoverProjectWithMSTestMetaPackageAndMultipleTFMsWithTests_ShouldReturnExitCodeSuccess - GivenDotnetTestBuildsAndRunsHelp.RunHelpOnMultipleTestProjects_ShouldReturnExitCodeSuccess - GivenDotnetTestBuildsAndRunsTests.RunningWithGlobalPropertyShouldProperlyPropagate - GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.RunMultipleProjectWithDifferentTFMs_ShouldReturnExitCodeGenericFailure - GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.RunProjectWithMultipleTFMs_ShouldReturnExitCodeGenericFailure - GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.RunProjectWithMultipleTFMs_ParallelizationTest_RunInParallelShouldFail - GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.RunProjectWithMSTestMetaPackageAndMultipleTFMs_ShouldReturnExitCodeGenericFailure Also fixes RunTestProjectSolutionWithRuntimeOption_ShouldReturnExitCodeSuccess, which hardcoded 'x64' as the runtime architecture. On arm64 macOS the x64 runtime is not installed, which produced the 'have arm64, need x86_64' mismatch in the test logs. It now derives the runtime architecture from the current process the same way the neighbouring tests do. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds a new TestInProgressMessages IPC message type (serializer id 10) so that the test platform can notify the SDK when a test starts. The SDK already has rendering machinery for in-progress tests (TestProgressState, TestNodeResultsState, AnsiTerminalTestProgressFrame, including the '... and X more' trimming) but it was dead because the protocol carried no 'test started' event and ShowActiveTests was never enabled. Changes: * IPC layer: new TestInProgressMessages model + TLV serializer, registered with id 10. Back-compat is preserved by the TLV format (unknown field ids are skipped) and NamedPipeServer skipUnknownMessages, so old SDKs paired with new MTPs continue to work and vice-versa. * Handler: TestApplicationHandler.OnTestInProgressReceived forwards each event to TerminalTestReporter.TestInProgress(assembly, tfm, arch, executionId, instanceId, uid, displayName). * State: TestNodeResultsState now keys running tests by (instanceId, uid) and tracks a completed set, so a stale in-progress notification arriving after the matching test result cannot resurrect a 'running' entry. Retries (new instanceId) are still surfaced correctly. * Default-on: ShowActiveTests is enabled when AnsiMode == AnsiIfPossible and progress is not suppressed, so it stays off in CI, --no-ansi, --no-progress and LLM environments. * Tests: round-trip + serializer id assertion for the new serializer, plus stale-add suppression / retry handling for TestNodeResultsState. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…string properties Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Adds the standalone `--use-current-runtime` (alias `--ucr`) option to the Microsoft.Testing.Platform code path of `dotnet test` so that restore and build target the current runtime, matching the behavior already available on `dotnet build`, `dotnet publish`, `dotnet run`, and `dotnet store`. The option is also added to the mutex with `--test-modules` (which globs DLLs and does not invoke MSBuild) so that combining the two now fails with a clear `GracefulException`. Resolves #50369. Replaces #53515. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Self-contained WPF apps crash due to missing ijwhost.dll. The fix is tracked in dotnet/wpf#11664. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…elease/10.0.4xx (#54400)
Co-authored-by: Jan Jones <janjones@microsoft.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: DonnaChen888 <v-donnachen@microsoft.com>
…c paths The codeflow from dotnet/dotnet updated how asset metadata OriginalItemSpec is tracked, now using full \obj\... paths instead of relative obj\... paths. Update all affected baseline JSON files to match.
…pability The ShowActiveTests option is set based on the requested AnsiMode, but TerminalTestReporter may decide at runtime to disable progress (e.g. when stdout is redirected, console is non-TTY, or ANSI codes aren't accepted). In that case the incoming TestInProgress events would still allocate and update TestNodeResultsState even though nothing can ever be rendered. Compute an effective _showActiveTests in the ctor as _options.ShowActiveTests && showProgress and use it to gate both the AddRunningTestNode and RemoveRunningTestNode paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Conflicts: # src/Cli/dotnet/Commands/Test/MTP/TestApplicationHandler.cs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reset patterns: - global.json - NuGet.config - eng/Version.Details.xml - eng/Version.Details.props - eng/common/*
…se/10.0.4xx-to-main
Reset patterns: - global.json - NuGet.config - eng/Version.Details.xml - eng/Version.Details.props - eng/common/*
…ts (fixes Blazor WASM blazor.webassembly.js 404) (#54649) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… publish assets (#54518) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…keys to test templates (#54698) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Aleš Prokop <ales.prokop.dev@gmail.com>
Co-authored-by: Jan Kratochvil <jan.kratochvil@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ation (#54653) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Reset patterns: - global.json - NuGet.config - eng/Version.Details.xml - eng/Versions.props - eng/common/* - CODEOWNERS
Member
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # eng/Version.Details.props # eng/Version.Details.xml # eng/Versions.props # eng/build.ps1 # eng/configure-toolset.ps1 # eng/configure-toolset.sh # eng/pipelines/templates/jobs/sdk-build.yml # eng/restore-toolset.ps1 # eng/restore-toolset.sh # global.json # src/Cli/Microsoft.DotNet.Cli.Definitions/Commands/Test/TestCommandDefinition.MicrosoftTestingPlatform.cs # src/Cli/dotnet-aot/AotSourceFiles.props # src/Cli/dotnet-aot/NativeEntryPoint.cs # src/Cli/dotnet/Commands/Test/MTP/TestApplicationHandler.cs # src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf # src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf # src/Cli/dotnet/Extensions/ParseResultExtensions.cs # src/Cli/dotnet/Parser.cs # src/Cli/dotnet/Telemetry/TelemetryClient.cs # src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/Microsoft.DotNet.ApiCompat.Task.csproj # src/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Task/Microsoft.DotNet.GenAPI.Task.csproj # src/Microsoft.CodeAnalysis.NetAnalyzers/tests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests/Microsoft.NetCore.Analyzers/Usage/MissingShebangInFileBasedProgramTests.cs # src/Tasks/Common/ConflictResolution/ResolvePackageFileConflicts.cs # src/Tasks/Common/Resources/Strings.resx # src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.CrossGen.targets # test/Microsoft.NET.Build.Tasks.Tests/GivenTasksUseAbsolutePaths.cs # test/Microsoft.NET.Publish.Tests/GivenThatAPublishedDepsJsonShouldContainVersionInformation.cs # test/dotnet-aot.Tests/AotParserTests.cs # test/dotnet-aot.Tests/NativeEntryPointTests.cs # test/dotnet-aot.Tests/dotnet-aot.Tests.csproj # test/dotnet-new.IntegrationTests/DotnetNewTestTemplatesTests.cs # test/dotnet.Tests/CommandTests/Project/Convert/DotnetProjectConvertTests.cs # test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithArtifacts.cs # test/dotnet.Tests/CommandTests/Test/TerminalTestReporterTests.cs # test/dotnet.Tests/CommandTests/Test/TestApplicationHandlerTests.cs # test/dotnet.Tests/CommandTests/Test/TestCommandParserTests.cs # test/dotnet.Tests/CommandTests/Test/snapshots/MTPHelpSnapshotTests.VerifyMTPHelpOutput.verified.txt Co-authored-by: SimonZhao888 <133954995+SimonZhao888@users.noreply.github.com>
Co-authored-by: SimonZhao888 <133954995+SimonZhao888@users.noreply.github.com>
Contributor
Resolved all merge conflicts in commit The conflicts were resolved by:
The PR branch now has a proper merge commit with |
Contributor
Author
📋 SDK Diagnostic Documentation ReminderThis PR introduces 1 new SDK diagnostic code:
Action RequiredPlease ensure that documentation for this diagnostic is added or updated in the dotnet/docs repository at:
Each diagnostic should have:
Thank you for helping keep our documentation up to date! 🙏 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I detected changes in the main branch which have not been merged yet to release/dnup. I'm a robot and am configured to help you automatically keep release/dnup up to date, so I've opened this PR.
This PR merges commits made on main by the following committers:
Instructions for merging from UI
This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.
If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.
Instructions for merging via command line
Run these commands to merge this pull request from the command line.
or if you are using SSH
After PR checks are complete push the branch
Instructions for resolving conflicts
Instructions for updating this pull request
Contributors to this repo have permission update this pull request by pushing to the branch 'merge/main-to-release/dnup'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.
The provided examples assume that the remote is named 'origin'. If you have a different remote name, please replace 'origin' with the name of your remote.
or if you are using SSH
Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1.