Skip to content

TaskHost IBuildEngine Callback Support spec#12868

Open
JanProvaznik wants to merge 8 commits intodotnet:mainfrom
JanProvaznik:taskhost-callbacks-spec
Open

TaskHost IBuildEngine Callback Support spec#12868
JanProvaznik wants to merge 8 commits intodotnet:mainfrom
JanProvaznik:taskhost-callbacks-spec

Conversation

@JanProvaznik
Copy link
Member

#12863

Changes Made

spec only

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

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

looks pretty good.

Should we add any ETW events as part of this? What about telemetry?

@JanProvaznik JanProvaznik self-assigned this Dec 8, 2025
@JanProvaznik JanProvaznik changed the title [wip] TaskHost IBuildEngine Callback Support spec for discussion TaskHost IBuildEngine Callback Support spec for discussion Dec 17, 2025
@JanProvaznik JanProvaznik changed the title TaskHost IBuildEngine Callback Support spec for discussion TaskHost IBuildEngine Callback Support spec Dec 17, 2025
AR-May added a commit that referenced this pull request Jan 21, 2026
### Context
PRs #12914 and #12868 showed that we need to be able to fix and
normalize `AbsolutePath`. Corresponding methods for strings live in
`FileUtilities.cs` that is a Shared file and cannot reference Framework
classes like `AbsolutePath`.

### Changes Made
- Moved some related functions to FrameworkFileUtilities class.
- Added the needed functions for `AbsolutePath`

### Testing
unit tests
johnazule pushed a commit to johnazule/msbuild that referenced this pull request Jan 22, 2026
…#13079)

### Context
PRs dotnet#12914 and dotnet#12868 showed that we need to be able to fix and
normalize `AbsolutePath`. Corresponding methods for strings live in
`FileUtilities.cs` that is a Shared file and cannot reference Framework
classes like `AbsolutePath`.

### Changes Made
- Moved some related functions to FrameworkFileUtilities class.
- Added the needed functions for `AbsolutePath`

### Testing
unit tests
@JanProvaznik
Copy link
Member Author

point brought up by @YuliiaKovalova should we decouple the classes of TaskHost and Sidecar? It seems a bit against the spirit of taskhosts and increases risk to existing scenarios to implement this pseudoworkernode functionality in the same class as the Taskhost which is supposed just to build a task and be done.

@JanProvaznik JanProvaznik marked this pull request as ready for review February 2, 2026 12:48
Copilot AI review requested due to automatic review settings February 2, 2026 12:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a design spec describing how to implement full IBuildEngine callback support when tasks execute in TaskHost, unblocking multithreaded (-mt) scenarios where tasks currently fail due to unsupported callbacks.

Changes:

  • Introduces a new multithreading spec documenting current TaskHost callback gaps and failure modes.
  • Proposes a bidirectional request/response packet protocol to forward callbacks to the parent node (including Yield/Reacquire).
  • Describes threading and environment/working-directory state management, plus risks and a testing strategy.

@JanProvaznik JanProvaznik requested a review from a team as a code owner February 25, 2026 13:10
JanProvaznik and others added 8 commits March 2, 2026 10:50
- Merge from main (brings in taskhost-threading.md from Stage 1)
- Refactor to reference taskhost-threading.md instead of duplicating
  threading model, callback flow, cancellation semantics, lifecycle
- Mark Q1 (connection loss) as resolved: OnLinkStatusChanged + MSB5027
- Update packet names: TaskHostIsRunningMultipleNodesRequest/Response
- Add Stage 2+ design considerations section with per-stage analysis
- Add cross-cutting state refactoring table for Stages 3/4
- Update terminology: parent -> owning worker node throughout
- Update testing/file changes sections with actual Stage 1 deliverables
- Add new key decisions (Shared location, env var pattern, specific packets)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Mark RequestCores/ReleaseCores as implemented in status table
- Rename TaskHostResourceRequest/Response to TaskHostCoresRequest/Response
- Update phased rollout table with PR dotnet#13306
- Replace Stage 2 design considerations with implementation summary

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants