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
Fix cache exception handling #6110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note that moving or refactoring a lot of code makes it much harder to review PRs, even when it's in a separate commit.
|
||
while (blockedNodes.Count > 0 || buildingNodes.Count > 0) | ||
Dictionary<ProjectGraphNode, BuildResult> resultsPerNode; | ||
using (cacheServiceTask.Result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why this changes the ordering versus when the graph build returns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using variables get disposed at the end of the block they're in. In this case the end of the block is after the last line in the block whish is the call to ReportResultsToSubmission, but the cache needs to be disposed (in order to surface any issues in EndBuildAsync) before the call to ReportResultsToSubmission.
7b9afd9
to
9e5cfc3
Compare
9e5cfc3
to
075a94c
Compare
075a94c
to
4583451
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK.
Fixes two issues when the plugin throws an exception in Plugin.EndBuildAsync during graph builds: