Avoid bug during FUTDC validation after solution build completes #9161
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.
Fixes #9152
In some cases (such as when FUTDC logging is enabled) we run a validation pass to report to the user when their projects appear out of date despite just having been built. This feature alerts users to overbuild and provides useful diagnostic information to correct it.
#9130 fixed a bug related to F5 builds. It introduced a race condition that can lead to the error reported in #9152.
Our
CurrentSolutionBuildContext
value is set when the SBM starts the solution build, and cleared tonull
when it completes.Our validation logic runs async, and can complete after the SBM completes. In such cases, it can observe a null
CurrentSolutionBuildContext
value, which is not supported by the current code.This change captures the
CurrentSolutionBuildContext
value early on to ensure it's non-null when we need it later on, and passes the specific value down, preventing any issues from null values.(This PR targets 17.8. I will back-port it to 17.7 too.)
Microsoft Reviewers: Open in CodeFlow