Repository navigation
Add opt-in CI MSBuild node reuse via DotNetBuildNodeReuse property - #7211
Merged
Merged
Conversation
By default VMR CI forces MSBuild nodeReuse=false. This adds an opt-in so a build can keep worker MSBuild nodes alive between invocations, mirroring the existing -mt / DotNetBuildMT mechanism: - repo-projects/Directory.Build.props: when /p:DotNetBuildNodeReuse=true is passed (and a repo hasn't set UseNodeReuse=false), export MSBUILD_NODEREUSE_ENABLED=1 to the inner repo build. - src/arcade/eng/common build/msbuild/tools scripts: only force nodeReuse=false on CI when MSBUILD_NODEREUSE_ENABLED != 1, and gate the "Node reuse must be disabled in CI build" guard the same way. Only src/arcade/eng/common is edited - this is the outgoing Arcade source that is copied into the inner repo builds by UpdateEngCommonFiles, so the source-build product repos pick up the gating. The root eng/common copy is a tooling file that must flow from dotnet/arcade, so it is intentionally not edited here. Default CI behavior is unchanged unless the property is passed. Co-authored-by: Copilot <[email protected]>
JanProvaznik
force-pushed
the
experiment/nodereuse-optin-property
branch
from
June 15, 2026 12:54
3dca36a to
47cb6ce
Compare
JanProvaznik
marked this pull request as ready for review
June 15, 2026 12:54
Member
Author
|
This will be used in MSBuild VMR validation pipeline. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
ViktorHofer
reviewed
Jun 15, 2026
Per review feedback, note in each eng/common build/msbuild/tools script that MSBUILD_NODEREUSE_ENABLED is internal-testing-only and will be replaced by a switch (dotnet/arcade#17013), so callers don't depend on it. Co-authored-by: Copilot <[email protected]>
JanProvaznik
enabled auto-merge (squash)
June 15, 2026 14:24
ViktorHofer
approved these changes
Jun 15, 2026
JanProvaznik
added a commit
to JanProvaznik/dotnet
that referenced
this pull request
Jul 9, 2026
The ChangeValidation ToolingFilesValidation step forbids modifying root eng/common (^eng/common/.*). The main repos already receive the node-reuse opt-in from src/arcade/eng/common (merged dotnet#7211/dotnet#7273) via the build-time UpdateEngCommonFiles copy, so root eng/common edits are unnecessary for server engagement in the important repos. Co-authored-by: Copilot <[email protected]>
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.
Makes MSBuild node reuse opt-in on CI via a property, instead of unconditionally removing the
nodeReuse=falseopt-outs (the original experiment in #6838). Follows the design of the existing-mt/DotNetBuildMTmechanism.What it does
repo-projects/Directory.Build.props- when/p:DotNetBuildNodeReuse=trueis passed (and a repo hasn't setUseNodeReuse=false), exportMSBUILD_NODEREUSE_ENABLED=1to the inner repo build.src/arcade/eng/commonbuild/msbuild/toolsscripts - only forcenodeReuse=falseon CI whenMSBUILD_NODEREUSE_ENABLED != 1, and gate the "Node reuse must be disabled in CI build" guard the same way.Default CI behavior is unchanged (node reuse stays disabled) unless the property is passed:
./build.sh --ci ... /p:DotNetBuildNodeReuse=trueScope
Per review feedback on #6838, only the outgoing Arcade source is edited:
src/arcade/eng/common/**is copied into the inner repo builds by theUpdateEngCommonFilestarget (for every repo except the bootstrap-arcade ones), so the source-build product repos pick up the gating at build time./eng/commoncopy is a tooling file (it must flow fromdotnet/arcade; the VMRChangeValidationstep rejects manual edits to it), so it is intentionally not edited here. It will pick up the change once it flows from Arcade.src/*/eng/commonmirrors are touched (they are regenerated during the build).Validation
extraPropertiesStage2: /p:DotNetBuildNodeReuse=true) in an earlier revision of this PR; theSB_*source-build stage-1 and stage-2 legs passed with node reuse enabled. That experiment commit was reverted to keep this PR focused/mergeable.bash -npasses on all modified.shscripts; the PowerShell parser passes on all modified.ps1scripts.