Skip to content
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

Start Dapr dashboard using random port #278

Merged
merged 8 commits into from
Feb 8, 2023
Merged

Conversation

philliphoff
Copy link
Collaborator

Previously, the extension started the Dapr dashboard using a random port it derives on its own. This change switches to a new feature in Dapr 1.10 where the Dapr CLI itself determines a suitable port. Also added is an attempt to actually shutdown the dashboard when the VS Code session is closed (i.e. when the extension is deactivated) by killing the process tree of the dashboard. (If this fails, the dashboard will still be shutdown when VS Code as a whole exits.)

This required way more refactoring of the Process wrapper than I would have expected, as well as the addition of an "async disposable" type. (Cancellation tokens weren't enough as killing the process tree is async, and VS Code wasn't giving enough time for it to happen implicitly.)

Resolves #277

@philliphoff philliphoff marked this pull request as ready for review February 8, 2023 17:58
@philliphoff philliphoff merged commit bc2cb6d into main Feb 8, 2023
@philliphoff philliphoff deleted the philliphoff-dashboard branch February 8, 2023 17:58
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.

[Engineering] Switch to dapr dashboard -p 0
2 participants