Skip to content

Add MSBUILDNODEHANDSHAKESALT for node reuse - #9229

Merged
ViktorHofer merged 2 commits into
mainfrom
ViktorHofer-patch-1
Sep 10, 2026
Merged

ViktorHofer merged 2 commits into
mainfrom
ViktorHofer-patch-1

Conversation

@ViktorHofer

Copy link
Copy Markdown
Member

Add MSBUILDNODEHANDSHAKESALT to EnvironmentVariables.

Add MSBUILDNODEHANDSHAKESALT to EnvironmentVariables.
Copilot AI lite review requested due to automatic review settings September 10, 2026 12:01
@ViktorHofer
ViktorHofer requested review from a team as code owners September 10, 2026 12:01
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The change is small, well-scoped to VMR orchestration, and aligns with MSBuild’s documented handshake behavior to safely isolate node reuse across sequential repo builds.

Review tier: Lite
Findings: None

What changed in this PR

This PR updates the VMR build orchestration to ensure MSBuild worker nodes/task hosts are not reused across different repository builds executed sequentially by the VMR, avoiding cross-repo leakage of process-wide state (notably TEMP directory assumptions).

Changes:

  • Adds MSBUILDNODEHANDSHAKESALT=dotnet-vmr-$(RepositoryName) to the repo-build EnvironmentVariables set.
  • Documents the rationale (node reuse across repos can break when a repo changes TEMP semantics, e.g., Roslyn drive subst behavior).
File Description
repo-projects/​Directory.Build.props Adds a per-repo MSBuild handshake salt to prevent cross-repo node reuse and associated temp-path failures.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@JanProvaznik JanProvaznik left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

note that if we want to have node reuse in the build we should have the reused nodes timeout fast or explicitly kill them. otherwise they'll accumulate and slow down the overall build I'd expect

@ViktorHofer

ViktorHofer commented Sep 10, 2026 •

Copy link
Copy Markdown
Member Author

What do you mean by "them"? The default idle time for server / reusable worker nodes is 15min, right? Should we pass an additional env var in to control that?

@JanProvaznik

JanProvaznik commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

reused nodes, yes

Added MSBUILDNODECONNECTIONTIMEOUT to limit idle timeout for reusable nodes.
@ViktorHofer
ViktorHofer enabled auto-merge (squash) September 10, 2026 15:35
@ViktorHofer
ViktorHofer merged commit 5f90c18 into main Sep 10, 2026
11 checks passed
@ViktorHofer
ViktorHofer deleted the ViktorHofer-patch-1 branch September 10, 2026 16:27
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