-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Added cancelation feature #7638
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
Added cancelation feature #7638
Conversation
|
Should you have a test? It can just sleep for 30 sec and if not canceled by then, Fail the test. |
|
|
||
| private void HandleServerNodeBuildCancel(ServerNodeBuildCancel command) | ||
| { | ||
| BuildManager.DefaultBuildManager.CancelAllSubmissions(); |
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.
I wonder, why can't we reuse here the cancellation from the MSBuildApp.Execute() function, by throwing the cancellation event manually? Also, how the things about the server after the current cancellation implementation works? Does server send the ServerNodeBuildResult package with the relevant information? A unit test would be helpful here, as we would see the intended output after the cancellation as well as check that the build was finalized.
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.
We discussed with Roman what we can reuse from the cancellation code in XMake (Console_CancelKeyPress). It contains some handling for interactive console, but server node works in non-interactive console.
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.
I planned to add test when Nathan's PR with server node tests is merged. We can merge his PR first and I will add test for cancelation.
AR-May
left a comment
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.
Feel free to merge it to the feature branch, and implement the test in other PR, as discussed!
I would be able to work on client side cancellation as soon as this PR is merged.
PR to the feature branch. It enables cancellation of the running build.