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

Implement workaround for Aspire dashboard launching #46100

Merged
merged 5 commits into from
Jan 21, 2025

Conversation

tmat
Copy link
Member

@tmat tmat commented Jan 17, 2025

Workaround for #44262.

Context

The change fixes browser launching for Aspire projects in dotnet watch. Aspire application is expected to launch browser on dashboard URL that contains auth token, but the standard dotnet-watch browser launching implementation launches browser without the token.

Customer impact

Aspire application run via dotnet-watch doesn't open dashboard page in the browser.

Details

The fix implements a simple workaround: it scans the output of the app host for the full dashboard URL.
The proper fix would be to add DCP protocol request that instructs IDE to launch browser at specified URL. This approach would avoid adding Aspire specific logic to launch profile processing. See dotnet/aspire#7197.

We should also
a) Move VS implementation of profile processing to a shared library/source package in SDK, so that we can share the logic between VS, VS Code and dotnet-run
b) Implement browser launching in dotnet run (#9038) and use [a] to process launch profile

Changes made

Special cases Aspire project in existing URL scanning code.

Testing

Manual testing to confirm that the changes correctly open the dashboard in the browser.

Risks

Small potential risk of breaking URL scanning, although this has been mitigated by added tests.

@tmat tmat requested a review from a team as a code owner January 17, 2025 20:28
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member labels Jan 17, 2025
Copy link
Contributor

Thanks for your PR, @tmat.
To learn about the PR process and branching schedule of this repo, please take a look at the SDK PR Guide.

@davidfowl
Copy link
Member

We want this in 9.0.2xx for aspire @marcpopMSFT, just a heads up.

@tmat tmat force-pushed the AspireBrowserLaunch branch from 7a3e8b1 to 8a8df71 Compare January 21, 2025 19:39
@marcpopMSFT
Copy link
Member

merge commit was a comment and built passed. Merging.

@marcpopMSFT marcpopMSFT merged commit b6240ba into dotnet:release/9.0.2xx Jan 21, 2025
6 of 31 checks passed
@tmat tmat added this to the 9.0.2 milestone Jan 29, 2025
@tmat tmat modified the milestones: 9.0.2, 9.0.2xx Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch Servicing-approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants