Repository navigation
Fix race in static graph restore when waiting for callbacks to complete - #7823
Merged
Merged
Conversation
zivkan
reviewed
Oct 27, 2026
Queue build submissions with project data and process results synchronously after `BuildManager.EndBuild()`. Remove asynchronous callback synchronization and exception handling while preserving build failure and total counts.
Nigusu-Allehu
previously approved these changes
Nov 3, 2026
jebriede
previously approved these changes
Nov 3, 2026
zivkan
previously approved these changes
Nov 3, 2026
Use a normal dictionary with a read-only return contract now that project population is single-threaded. Restore the EndBuild comment and remove obsolete callback coordination from the finalization test. Co-authored-by: Copilot <[email protected]> Copilot-Session: 86393a61-18b4-453c-b4a8-9439a2327d9c
jeffkl
dismissed stale reviews from zivkan, jebriede, and Nigusu-Allehu
via
November 6, 2026 21:39
21185bc
zivkan
approved these changes
Nov 11, 2026
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Fixes: NuGet/Home#15119
Description
The MSBuild APIs allow you to queue builds and specify a callback. After the builds are queued, calling
EndBuild()blocks the current thread until all queued builds are complete. However, it does not wait for the callbacks to complete. This means that intermittently, the code will continue after builds are done but a callback is not.The fix is to use counter of pending callbacks and a
ManualResetEventwhich signals when the pending build count is at zero.Coplot also suggested aggregating the exceptions for good measure so that's included as well.
PR Checklist