Repository navigation
[EXPERIMENT] Stop forcing MSBuild nodeReuse=false on CI builds - #6838
JanProvaznik wants to merge 51 commits into
Conversation
EXPERIMENTAL CI bring-up patch. Do NOT merge.
Today every Arcade-style build.ps1 / build.sh (and a few repo-specific
wrappers) force nodeReuse=false whenever --ci is passed, and a couple of
scripts hard-code /nr:false or --nodereuse false on the MSBuild command line.
This branch removes those forced opt-outs across the VMR so that MSBuild's
default (nodeReuse=true) applies. The goal is to exercise a 'node reuse on
everywhere' configuration on dnceng-public and observe whether real
source-build / unified-build pipelines tolerate it, which kinds of tasks or
task assemblies break under reuse, and what the perf impact is.
Why this is an experiment, not a desirable change:
- CI environments are short-lived; node reuse mostly buys persistent caches
that benefit interactive/local builds, not single-shot CI runs.
- nodeReuse=false on CI has been the long-standing default for good reasons
(build determinism, avoiding stale tasks across stages, working around
custom task assemblies that don't tolerate reuse).
- Re-enabling it broadly is likely to surface regressions in custom tasks,
task host process lifecycle, and locked-file scenarios on Windows.
Scope (build infrastructure only):
- Removed the 'if ci then nodeReuse=false' line from every Arcade
eng/common/build.{ps1,sh} and eng/common/msbuild.{ps1,sh} mirrored in the
VMR, including the arcade source under src/arcade/ and every per-repo copy.
- Removed the same override from VMR-root eng/build.ps1 and eng/common/*.
- Removed analogous overrides from custom build scripts in aspnetcore,
msbuild, fsharp, and nuget-client:
src/aspnetcore/eng/build.ps1
src/msbuild/eng/build.ps1
src/msbuild/eng/cibuild_bootstrapped_msbuild.{ps1,sh}
src/fsharp/eng/build.sh
src/nuget-client/eng/dotnet-build/build.{ps1,sh}
- Left product code and intentional-disable test code alone:
src/nuget-client/src/NuGet.Clients/NuGet.CommandLine/MsBuildUtility.cs,
src/{fsharp,roslyn}/eng/test-determinism.ps1,
src/nuget-client/test/.../DotnetIntegrationTestFixture.cs,
src/roslyn/src/Compilers/Core/MSBuildTaskTests/**.
After this patch the affected scripts no longer pass /nr:false on CI, so
MSBuild's default nodeReuse=true applies and worker MSBuild processes will
linger between invocations until they idle out.
Co-authored-by: Copilot <[email protected]>
Without this, the previous commit had no effect: the first arcade build call
exits with `Node reuse must be disabled in CI build.` from
`MSBuild-Core` in Arcade's `tools.{ps1,sh}`. This commit drops that
guard in the VMR root `eng/common/tools.{ps1,sh}` and in the arcade source
at `src/arcade/eng/common/tools.{ps1,sh}` so the rest of the experiment
can actually exercise `nodeReuse=true` on CI.
Per-sub-repo `src/*/eng/common/tools.{ps1,sh}` mirrors are intentionally
left untouched because the VMR's ChangeValidation tool rejects direct
edits to those tooling-files paths.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Revert all the "eng/common" file changes except ones under the root /eng/common and src/arcade/eng/common. Those two locations are used for the other inner builds and are copied during the build. src/arcade/eng/common is also the "outgoing" source that flows to the subscribed repos.
dotnet/repo-projects/Directory.Build.targets
Lines 344 to 345 in 44cf402
Of course, in order to get this to a mergeable state, we nodeReuse=false removal would need to be put under a flag.
|
The source-build and Ubuntu job failure are just due to a syntax error:
Everything else is actually passing. |
[[ commit created by automation ]]
[[ commit created by automation ]]
dotnet#7362) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…otnet#7354) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet#7366) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…otnet#7367) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Two failures in the VMR productBuild Linux pack of vstest packages, both from the nuspec->SDK-pack migration: 1. NU5129 on Microsoft.NET.Test.Sdk and Microsoft.CodeCoverage: PackagePath used trailing backslashes (build\netstandard2.0\). On Linux NuGet does not treat a trailing backslash as a directory separator, producing a double-slash path (build/netstandard2.0//<PackageId>.props) that fails the package convention check. Use forward slashes so the path resolves cleanly on both Windows and Linux. 2. Microsoft.TestPlatform.CLI 'Could not find .../Release/net11.0': the non-Windows/source-build content group pulled files from $(OutputPath)$(NetCurrent) (net11.0), but only source-only builds produce a net11.0 output (Directory.Build.targets overrides TargetFrameworks to $(NetCurrent)). In the non-source-only Linux product build the project builds $(NetSDKTargetFramework) (net10.0). Introduce a mode-aware _CliContentTfm (= $(NetCurrent) when source-only, else $(NetSDKTargetFramework)) and use it for the content TFM so pack references the folder that is actually produced. Co-authored-by: Copilot <[email protected]>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…nt (dotnet#7415) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…oslyn libsqlite3mc.so (dotnet#7426) Co-authored-by: Matt Mitchell (.NET) <[email protected]> Co-authored-by: Copilot <[email protected]>
) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Matt Thalman <[email protected]>
…dotnet#7422) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…dotnet#7443) [release/11.0.1xx-preview6] Source code updates from microsoft/vstest
…otnet#7457) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…otnet#7479) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…otnet#7483) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…ild-assets (dotnet#7468) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…otnet#7515) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…ild-assets (dotnet#7507) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…nt (dotnet#7445) [release/11.0.1xx-preview6] Source code updates from nuget/nuget.client
dotnet#7534) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…otnet#7485) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…nt (dotnet#7539) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…l analysis being disabled (dotnet#7582)
…otnet#7573) [release/11.0.1xx-preview6] Source code updates from dotnet/fsharp
[[ commit created by automation ]]
The Windows_x86 leg of build 1500300 failed with a non-deterministic native crash (exit code 3221225477 / 0xC0000005 access violation) in rollup while building the aspnetcore @microsoft/microsoft.components.customelements JS bundle. The identical commit built successfully on Windows_x64 and every other vertical, confirming a transient infrastructure failure rather than a source defect. This empty commit re-triggers the pipeline. Co-authored-by: Copilot <[email protected]>
Merge darc-release/11.0.1xx-preview6 (the branch this experiment was
forked from, now 339 commits ahead) into experiment/nodereuse-default-on.
All merge conflicts were in arcade-mirrored eng/common/*.{ps1,sh} scripts.
The base introduced the official MSBUILD_NODEREUSE_ENABLED opt-in
(dotnet/arcade#17013) that supersedes the experiment's manual removal of
the 'nodeReuse=false on CI' guards. Those eng/common files must match the
arcade upstream, and forcing node reuse on would trip the base's per-repo
'Node reuse must be disabled in CI build' hard guards and fail CI.
Resolved by adopting the base's canonical version for all affected files.
Co-authored-by: Copilot <[email protected]>
|
outdated |
EXPERIMENT — do not merge. No reviewers pinged on purpose.
This branch removes every CI-side
nodeReuse=falseopt-out from the VMR'sbuild scripts so MSBuild's default (
nodeReuse=true) applies on CI. Theintent is to exercise a "node reuse on everywhere" configuration on
dnceng-public and observe whether real source-build / unified-build pipelines
tolerate it, which custom tasks misbehave under reuse, and what the perf
impact looks like.
Why this is an experiment, not a desirable change
that benefit interactive/local builds, not single-shot CI runs.
nodeReuse=falseon CI has been the long-standing default for goodreasons: build determinism, avoiding stale tasks across stages, and working
around custom task assemblies that don't tolerate reuse.
task host lifecycle, and locked-file scenarios on Windows.
Scope (build infrastructure only)
Removed the
if (\) { ... \ = \False }andif [[ \"\\" == true ]]; then node_reuse=false; filines from:eng/build.ps1,eng/common/build.{ps1,sh},eng/common/msbuild.{ps1,sh}src/arcade/eng/common/build.{ps1,sh},src/arcade/eng/common/msbuild.{ps1,sh}src/*/eng/common/src/aspnetcore/eng/build.ps1,src/msbuild/eng/build.ps1,src/msbuild/eng/cibuild_bootstrapped_msbuild.{ps1,sh},src/fsharp/eng/build.sh,src/nuget-client/eng/dotnet-build/build.{ps1,sh}Left intentionally untouched (product code or tests that disable reuse on purpose):
src/nuget-client/src/NuGet.Clients/NuGet.CommandLine/MsBuildUtility.cssrc/{fsharp,roslyn}/eng/test-determinism.ps1src/nuget-client/test/NuGet.Core.FuncTests/Dotnet.Integration.Test/DotnetIntegrationTestFixture.cssrc/roslyn/src/Compilers/Core/MSBuildTaskTests/**Diff summary
104 files changed, +6 / −114 lines. After this patch the affected scripts no
longer pass
/nr:falseon CI, so the worker MSBuild processes will lingerbetween invocations until they idle out.