Sidecar fix for CLR2 runtime + respect nodereuse from buildparams#12416
Merged
YuliiaKovalova merged 10 commits intomainfrom Aug 29, 2025
Merged
Sidecar fix for CLR2 runtime + respect nodereuse from buildparams#12416YuliiaKovalova merged 10 commits intomainfrom
YuliiaKovalova merged 10 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a handshake failure in MSBuild's sidecar taskhost functionality by addressing node reuse compatibility issues with legacy task hosts. The primary issue was that parent MSBuild processes attempted to enable node reuse with CLR2 task hosts that don't support this feature.
Key Changes:
- Refactored node reuse logic by extracting complex boolean conditions into a dedicated method for better maintainability
- Added automatic detection and disabling of node reuse for legacy CLR2 runtime
- Fixed minor spelling and naming issues in comments and test method names
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Shared/CommunicationsUtilities.cs |
Fixed spelling error and added legacy runtime/architecture checks to disable node reuse |
src/Build/BackEnd/Components/Communications/NodeProviderOutOfProcTaskHost.cs |
Extracted node reuse logic into dedicated method with legacy scenario detection |
src/Build.UnitTests/BackEnd/TaskHostFactory_Tests.cs |
Fixed test method name capitalization |
src/Build.UnitTests/BackEnd/ProcessIdTaskSidecar.cs |
Added missing period to comment |
src/Build/BackEnd/Components/Communications/NodeProviderOutOfProcTaskHost.cs
Show resolved
Hide resolved
SimaTian
approved these changes
Aug 26, 2025
SimaTian
reviewed
Aug 26, 2025
rainersigwald
approved these changes
Aug 26, 2025
src/Build/BackEnd/Components/Communications/NodeProviderOutOfProcTaskHost.cs
Outdated
Show resolved
Hide resolved
8d1925a to
2a54cb7
Compare
rainersigwald
approved these changes
Aug 28, 2025
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.
Context
The introduction of sidecar taskhost functionality exposed compatibility issues with legacy scenarios and configuration settings. Node reuse was being enabled inappropriately, causing handshake failures and ignoring user preferences.
Key Issues Identified:
/nodereusearg.Changes Made
Implemented comprehensive node reuse validation to ensure node reuse is only enabled when all conditions are satisfied: