Avoid node reuse during desktop-hosted builds#896
Conversation
|
LGTM |
|
D'oh, forgot that we dropped that switch entirely on core, not just made it a no-op. |
|
Is this because there is no node reuse on core? Or you can't turn it off on core? |
|
@jeffkl You can't turn it on. The way it's implemented on Windows uses a named pipe named after the PID, so you can enumerate all MSBuild processes and ask if they're available for your use. But that's a potential elevation-of-privilege attack if you can talk to an elevated process (or another user) while yourself running in low-priv mode. Windows provides APIs to check that both sides of the pipe are the same user + elevation level, but other OSes don't, so we just cut the feature for Core. See 86f213b and #506. |
|
Interesting, well then I'm sure you know what to do, conditionally add the argument... |
|
Can you branch whether to use the switch or not in the caller of |
|
Yeah, I'll do that in the next iteration, as soon as I get a free minute. |
If msbuild is invoked with the (default) `/nodeReuse:true` argument, worker nodes hang around for a period of time after the build is complete to see if more work will be incoming. This is normally a nice startup-time-reducing perf optimization. But in our own build, it means that many newly-created MSBuild assemblies are opened and uneditable, failing builds and causing cleans to fail. Changing the Windows build script to just always pass `/nodeReuse:false` when not using the CoreCLR MSBuild.
284cbee to
92d1d6a
Compare
|
Turned out to be easier to branch inside |
|
|
If msbuild is invoked with the (default)
/nodeReuse:trueargument,worker nodes hang around for a period of time after the build is complete
to see if more work will be incoming. This is normally a nice
startup-time-reducing perf optimization. But in our own build, it means
that many newly-created MSBuild assemblies are opened and uneditable,
failing builds and causing cleans to fail.
Changing the Windows build script to just always pass
/nodeReuse:false.