Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent reading from .rsp file for worker nodes #11170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YuliiaKovalova
Copy link
Member

Context

Sometimes Windows Defender blocks on MSBuild.rsp file reading operation (e.g. https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2308633).
Since response file content isn't needed for worker nodes, we can skip reading from t.

Changes Made

Add a check for nodemode: arg in command like

Testing

Local testing when rsp file is manually locked.

if (!switchesNotFromAutoResponseFile[CommandLineSwitches.ParameterlessSwitch.NoAutoResponse])

// Response files should NOT be used on the worker nodes.
if (!commandLineArgs.Any(cla => cla.Contains("nodemode:") || cla.Contains("nmode:")))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be?

Suggested change
if (!commandLineArgs.Any(cla => cla.Contains("nodemode:") || cla.Contains("nmode:")))
if (!switchesNotFromAutoResponseFile[ParameterizedSwitch.NodeMode])

@jeffkl
Copy link
Contributor

jeffkl commented Dec 18, 2024

Rather than hard code the argument parsing logic to ignore one thing if another is specified, perhaps it would better to just specify the /noautoresponse command-line argument when spawning the worker node?

string commandLineArgs = $"/nologo /nodemode:1 /nodeReuse:{ComponentHost.BuildParameters.EnableNodeReuse.ToString().ToLower()} /low:{ComponentHost.BuildParameters.LowPriority.ToString().ToLower()}";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants