Build coordinator for system-wide MSBuild node management#13335
Closed
JakeRadMSFT wants to merge 2 commits intodotnet:mainfrom
Closed
Build coordinator for system-wide MSBuild node management#13335JakeRadMSFT wants to merge 2 commits intodotnet:mainfrom
JakeRadMSFT wants to merge 2 commits intodotnet:mainfrom
Conversation
Fix 3 macOS/Unix node reuse bugs:
- Node reuse handshake timeout was 0ms (poll-only), increased to 1000ms
- getsid() returns per-terminal values on Unix, breaking cross-terminal reuse; use sessionId=0
- ClientConnectTimeout was 60s, reduced to 5s
Add hash-based pipe naming on Unix:
- Nodes create pipes as MSBuild-{hash}-{PID} for O(1) discovery
- Replaces probing all dotnet processes on the system
Add build coordinator (dotnet msbuild --coordinator):
- System-wide node budget management across concurrent MSBuild instances
- Epoch-based heartbeat-gated promotion prevents budget overrun
- Fair-share budget with dynamic rebalancing as builds start/finish
- PID-aware staleness reaper for crashed builds
- Pipe file watchdog for self-healing
- ShutdownExcessNodes for mid-build node trimming
- Coordinator-aware node lifecycle (no-reuse on shutdown)
Results: 10 concurrent builds peak at 11 nodes (was 55+), immediate cleanup.
- BuildCoordinator_Tests.cs: 29 tests covering coordinator protocol, fair-share budgeting, client retry logic, concurrent connections, staleness reaper, and cleanup behavior - HashBasedPipeNaming_Tests.cs: 14 tests covering ComputeHash determinism/caching, GetHashBasedPipeName format, FindNodesByHandshakeHash file matching, and SessionId=0 fix on Unix - Reduce DefaultNodeConnectionTimeout from 15 minutes to 30 seconds so idle nodes clean up promptly instead of lingering
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.
Replaced by #13338
( and #13336 , #13337 )