Add troubleshooting link to dashboard resource service connection error logs#18194
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18194Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18194" |
There was a problem hiding this comment.
Pull request overview
This PR adds a troubleshooting link (https://aka.ms/aspire/dashboard-connection-failed) to error log messages emitted by DashboardClient when it fails to connect to the resource service. This gives users immediate guidance when they see connection error logs in the dashboard.
Changes:
- Appended the troubleshooting URL to three error log messages in
DashboardClient.cscovering all connection failure paths (initial retry, overall connection failure, watch stream disconnection) - Added a new unit test verifying the troubleshooting link appears in error log output
- Simplified a redundant timeout in an existing test (
WaitAsync(TimeSpan.FromSeconds(30))→WaitAsync()since.DefaultTimeout()already provides the timeout)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Aspire.Dashboard/ServiceClient/DashboardClient.cs |
Appends troubleshooting URL to three error log messages in connection failure paths |
tests/Aspire.Dashboard.Tests/Model/DashboardClientTests.cs |
Adds test for troubleshooting link in error logs, adds FailOnGetApplicationInformation mock option, simplifies existing test timeout |
PR Testing ReportResult: ✅ PR #18194 verified successfully PR Information
Changes Analyzed
Test Scenarios ExecutedScenario: DashboardClientTests (full class)Objective: Verify the troubleshooting link appears in error logs and no regressions in existing connection state tests Results:
Summary
Overall Result✅ PR VERIFIED - Low-risk string addition to existing log messages, fully covered by unit test. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
❓ CLI E2E Tests unknown — 115 passed, 0 failed, 2 unknown (commit View all recordings
📹 Recordings uploaded automatically from CI run #27457944040 |
Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
Description
When the dashboard fails to connect to the resource service, users see error log messages but have no guidance on how to troubleshoot the problem. This change appends a troubleshooting link (
https://aka.ms/aspire/dashboard-apphost-connection-failed) to the error log messages emitted during connection failures, so users can quickly find relevant documentation.The URL is defined as a
private const stringto avoid repetition across the three error paths:ConnectWithRetryAsync)ConnectAndWatchAsync)WatchWithRecoveryAsync)Checklist
<remarks />and<code />elements on your triple slash comments?