Skip to content

Conversation

@MichalPavlik
Copy link
Member

PR to the feature branch. It enables cancellation of the running build.

@danmoseley
Copy link
Member

danmoseley commented May 19, 2022

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();
Copy link
Member

@AR-May AR-May May 20, 2022

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

Copy link
Member

@AR-May AR-May left a 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.

@MichalPavlik MichalPavlik merged commit 5c2eead into feature/msbuild-server May 24, 2022
@baronfel baronfel deleted the dev/mipavlik/msbuild-server-cancellation branch March 20, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants