Restore dotnet watch dashboard auto-launch signal#17610
Conversation
Co-authored-by: karolz-ms <15271049+karolz-ms@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17610Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17610" |
There was a problem hiding this comment.
Pull request overview
Restores a legacy “Login to the dashboard at …” log line so dotnet watch can detect when the dashboard login URL is available and auto-launch a browser, while keeping the newer multi-line dashboard summary output intact.
Changes:
- Emit an additional structured
LogInformationline ("Login to the dashboard at {LoginUrl}") when a dashboard login URL can be constructed. - Update shared logging helper unit tests to assert the extra log entry and its structured payload.
- Extend AppHost dashboard-ready test coverage to assert the legacy login line is emitted with the endpoint-resolved URL.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/Aspire.Hosting.Tests/Dashboard/DashboardEventHandlersTests.cs | Adds assertions that the legacy login line is emitted and contains the expected resolved login URL. |
| tests/Aspire.Dashboard.Tests/LoggingHelpersTests.cs | Updates expectations to account for the additional legacy login log entry and validates structured fields. |
| src/Shared/LoggingHelpers.cs | Adds the legacy login LogInformation line when loginUrl is available, preserving existing summary logging. |
|
@copilot looks like this change caused FrontendBrowserTokenAuthTests.LogOutput_NoToken_GeneratedTokenLogged to start failing. Investigate and fix. |
Co-authored-by: karolz-ms <15271049+karolz-ms@users.noreply.github.com>
Fixed in a5e6d63 by updating the browser token log-output assertion to expect the restored legacy login line before the dashboard summary. Targeted dashboard auth tests pass. |
|
@copilot resolve the merge conflicts in this pull request Add a comment to |
Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
Resolved the merge conflicts in f4215a7 and added the dotnet watch contract comment in b6aede9. Targeted dashboard tests pass. |
|
❓ CLI E2E Tests unknown — 107 passed, 0 failed, 2 unknown (commit View all recordings
📹 Recordings uploaded automatically from CI run #26615995178 |
|
/backport to release/13.4 |
|
Started backporting to |
|
@JamesNK backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Creating an empty commit: Initial plan
Applying: Emit dashboard login line for dotnet watch
Applying: Fix dashboard browser token log test
Applying: Clarify dotnet watch login log contract
Using index info to reconstruct a base tree...
M src/Shared/LoggingHelpers.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Shared/LoggingHelpers.cs
CONFLICT (content): Merge conflict in src/Shared/LoggingHelpers.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0004 Clarify dotnet watch login log contract
Error: The process '/usr/bin/git' failed with exit code 128 |
Description
dotnet watchdepends on the exact dashboard login log shape to detect when the AppHost is serving HTTP traffic and open the browser. Aspire 13.4 kept the login URL in the new dashboard summary, but no longer emitted the legacy line thatdotnet watchrecognizes.Compatibility signal
dotnet watch.Existing output preserved
Dashboard,Login URL, and OTLP endpoint lines.Coverage
Checklist
<remarks />and<code />elements on your triple slash comments?