Add command to show dev tunnel URLs - #16842
Conversation
Co-authored-by: Copilot <223556219+Copilot@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 -- 16842Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16842" |
There was a problem hiding this comment.
Pull request overview
Adds a built-in Show tunnel URLs resource command to Dev Tunnel port resources so the dashboard can immediately display the public tunnel URL, inspect URL, and local endpoint URL as a markdown command result.
Changes:
- Adds a new
show-tunnel-urlscommand toDevTunnelPortResourcewith enabled/disabled state driven by resource state and tunnel status. - Implements markdown command output generation (tunnel/inspect/local URLs) and refactors inspect URL generation into a helper.
- Adds a unit test and updates localized resource strings (.resx + .xlf + generated designer).
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Hosting.DevTunnels.Tests/DevTunnelResourceBuilderExtensionsTests.cs | Adds a test validating the new command’s enabled/disabled state and markdown output. |
| src/Aspire.Hosting.DevTunnels/DevTunnelResourceBuilderExtensions.cs | Registers the new resource command on Dev Tunnel port resources and builds the markdown command result. |
| src/Aspire.Hosting.DevTunnels/DevTunnelResource.cs | Introduces the internal command name constant for the new command. |
| src/Aspire.Hosting.DevTunnels/Resources/MessageStrings.resx | Adds new localized string entries for command UI text and result messages. |
| src/Aspire.Hosting.DevTunnels/Resources/MessageStrings.Designer.cs | Regenerates strongly-typed resource accessors for the new strings. |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.cs.xlf | Adds new trans-units for the command strings (cs locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.de.xlf | Adds new trans-units for the command strings (de locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.es.xlf | Adds new trans-units for the command strings (es locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.fr.xlf | Adds new trans-units for the command strings (fr locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.it.xlf | Adds new trans-units for the command strings (it locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.ja.xlf | Adds new trans-units for the command strings (ja locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.ko.xlf | Adds new trans-units for the command strings (ko locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.pl.xlf | Adds new trans-units for the command strings (pl locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.pt-BR.xlf | Adds new trans-units for the command strings (pt-BR locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.ru.xlf | Adds new trans-units for the command strings (ru locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.tr.xlf | Adds new trans-units for the command strings (tr locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.zh-Hans.xlf | Adds new trans-units for the command strings (zh-Hans locale). |
| src/Aspire.Hosting.DevTunnels/Resources/xlf/MessageStrings.zh-Hant.xlf | Adds new trans-units for the command strings (zh-Hant locale). |
Files not reviewed (1)
- src/Aspire.Hosting.DevTunnels/Resources/MessageStrings.Designer.cs: Language not supported
|
🎬 CLI E2E Test Recordings — 77 recordings uploaded (commit View all recordings
📹 Recordings uploaded automatically from CI run #25463607200 |
|
Copilot resolve the merge conflicts in this pull request |
Co-authored-by: DamianEdwards <249088+DamianEdwards@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Maddy Montaquila (maddymontaquila)
left a comment
There was a problem hiding this comment.
Found one additional build-blocking issue. The existing unresolved thread about the command potentially waiting indefinitely remains applicable.
Avoid waiting for an unallocated target endpoint and update command context tests for the current required API. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Build command output from conditional markdown rows and use the current command result overload. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
Normalize inspect URLs and clarify that the command displays URLs that are currently available. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: bbf89d33-83ee-4932-80ec-4c94eda9b9be
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Review details
Files not reviewed (1)
- src/Aspire.Hosting.DevTunnels/Resources/MessageStrings.Designer.cs: Generated file
Suppressed comments (1)
src/Aspire.Hosting.DevTunnels/DevTunnelResourceBuilderExtensions.cs:616
- This command depends entirely on an interaction, but the default visibility also advertises it to API clients. API command execution is non-interactive, so those clients will discover an enabled
show-tunnel-urlscommand that always fails theIInteractionService.IsAvailablecheck. Restrict this dashboard action to UI visibility (and update the command metadata assertion accordingly).
IsHighlighted = true,
- Files reviewed: 19/20 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: bbf89d33-83ee-4932-80ec-4c94eda9b9be
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: bbf89d33-83ee-4932-80ec-4c94eda9b9be
There was a problem hiding this comment.
Review details
Files not reviewed (1)
- src/Aspire.Hosting.DevTunnels/Resources/MessageStrings.Designer.cs: Generated file
Suppressed comments (1)
src/Aspire.Hosting.DevTunnels/DevTunnelResourceBuilderExtensions.cs:621
- The command is marked enabled without checking
IInteractionService.IsAvailable, even though execution immediately fails when interactivity is disabled. This leaves a highlighted dashboard action enabled that cannot succeed (for example when interactivity is disabled by configuration). Include service availability inUpdateState, as other interaction-backed commands do inAspire.Hosting.Browsers/BrowserLogsBuilderExtensions.cs:224-229.
UpdateState = context =>
context.ResourceSnapshot.State?.Text == KnownResourceStates.Running &&
portResource.LastKnownStatus?.PortUri is not null
? ResourceCommandState.Enabled
: ResourceCommandState.Disabled
- Files reviewed: 19/20 changed files
- Comments generated: 0 new
- Review effort level: Balanced
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: bbf89d33-83ee-4932-80ec-4c94eda9b9be
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: bbf89d33-83ee-4932-80ec-4c94eda9b9be
Tests selector (audit mode)The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement. 10 / 100 test projects · 2 jobs, from 20 changed files. Selected test projects (10 / 100)
Selected jobs (2)
How these were chosen — grouped by what changed
🧪 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🔧 🧪 🧪 Job reasons
Selection computed for commit |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
edd7998
into
main
|
Pull request created: #1492
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#1492 targeting Added a new Show tunnel URLs section to Note This draft PR needs human review before merging. |
|
The CI build failed due to test failure(s) that appear unrelated to the PR changes. These may be flaky tests. Suspected flaky test(s):
Suggested actions:
You can re-run the failed jobs from the workflow run page. |
Description
Adds discoverable Dev Tunnel URLs to dev tunnel port resources:
The action inspects derived resource state and uses
IInteractionServicedirectly rather than returning command-result data through the generic text visualizer.Validation:
dotnet test --project tests\Aspire.Hosting.DevTunnels.Tests\Aspire.Hosting.DevTunnels.Tests.csproj --no-launch-profile -- --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"dotnet build /t:UpdateXlf src\Aspire.Hosting.DevTunnels\Aspire.Hosting.DevTunnels.csprojFixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: