Fix DevTunnel endpoint URL publication - #19590
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19590Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19590" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Restricts proxyless port allocation to compute resources, restoring DevTunnel URL publication.
Changes:
- Gates automatic port allocation on
IComputeResource. - Adds DevTunnel regression coverage.
- Verifies
DotnetProjectResourceremains a compute resource.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Aspire.Hosting/Dcp/DcpExecutor.cs |
Limits proxyless port allocation to compute resources. |
tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs |
Tests compute and DevTunnel allocation behavior. |
tests/Aspire.Hosting.Dotnet.Tests/DotnetProjectResourceTests.cs |
Verifies .NET project compute classification. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Karol Zadora-Przylecki (karolz-ms)
left a comment
There was a problem hiding this comment.
Reviewed the change and verified the core behavior locally. Summary: 1 blocking correctness/regression issue, 1 incorrect comment, and 3 test-coverage gaps.
The headline problem is that IComputeResource does not mean "has a DCP workload" — DCP selects container workloads by ContainerImageAnnotation, which RunAsEmulator adds directly to Azure resources that are not IComputeResource. I reproduced a startup crash for that case on this branch; details are inline.
|
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. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
This comment has been minimized.
This comment has been minimized.
PR Testing ReportPR Information
Artifact Version Verification
Changes AnalyzedFiles Changed
Change Categories
Test Scenarios ExecutedScenario 1: DCP proxyless allocator regression suiteObjective: Verify the new workload predicate and preserve executable, project, ordinary container, and fixed-port behavior. Coverage Type: Regression and boundary Status: PASS Tests:
Result: 6 passed, 0 failed. Evidence: Scenario 2: DevTunnel lifecycle and DotnetProject classificationObjective: Verify DCP publishes DevTunnel URLs and Coverage Type: Regression Status: PASS Tests:
Result: 3 passed, 0 failed. Evidence:
Scenario 3: Previously failing Azure Storage emulator compatibilityObjective: Verify an annotation-backed, non-compute container resource receives and reuses host ports across persistent restarts. Coverage Type: Regression and persistent-lifetime boundary Status: PASS Test: Result: 1 passed, 0 failed under Podman. Evidence:
Scenario 4: Fresh dogfood DevTunnel reproductionObjective: Reproduce the reported lifecycle with a new AppHost from the updated PR package hive and a deterministic fake Coverage Type: Happy path and boundary Status: PASS Steps:
Observed Resource State:
Evidence:
Scenario 5: Full Hosting.Azure CI corroborationObjective: Confirm the fix survives the complete Azure hosting suites on both CI operating systems. Coverage Type: Full project CI Status: PASS Results:
CI Jobs:
Evidence:
Additional CI SignalAt the final snapshot, the PR had 363 passing, 13 pending, 1 skipped, and 1 failing check. The failure is the untouched VS Code extension CI Job: https://github.com/microsoft/aspire/actions/runs/32551198408/job/96979500951 Summary
Overall ResultPASS - PR CHANGES VERIFIED All approved changed-area scenarios passed. The prior Azure Storage emulator regression is fixed locally and in both full ArtifactsAll preserved logs, snapshots, the repro AppHost, fake CLI, latest PR diff, CI evidence, and a compressed local evidence bundle are in this report directory. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Limit automatic proxyless port allocation to compute resources so integration-owned endpoints can publish their own addresses. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e3b04d22-d265-49d0-861a-09aac8be80d6
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ec7aab9b-2163-45b7-89f6-c349fef7f07f
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
89ace5c to
ec17237
Compare
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. 50 / 102 test projects · 4 jobs, from 4 changed files. Selected test projects (50 / 102)
Selected jobs (4)
How these were chosen — grouped by what changed
🔧 show 44
🧪 📦 affected project 🧪 🧪 Job reasons
Selection computed for commit |
Updated [Aspire.Hosting.AppHost](https://github.com/microsoft/aspire) from 13.4.6 to 13.5.3. <details> <summary>Release notes</summary> _Sourced from [Aspire.Hosting.AppHost's releases](https://github.com/microsoft/aspire/releases)._ ## 13.5.3 ## What's New in Aspire 13.5.3 Patch release for Aspire 13.5 that fixes Dashboard Graph view crashes for resources with multi-path icons and restores missing public URLs for DevTunnel resources. ### 🐛 Fixes - 📊 **Dashboard Graph view could crash for Azure Blob resources** — Resources such as those created with `AddBlobs` use icons containing multiple SVG paths, which caused an XML parsing exception and broke the dashboard circuit. The graph now combines multi-path icons correctly. Regression introduced in 13.5. Fixes [#19489](microsoft/aspire#19489). ([#19585](microsoft/aspire#19585), backport of [#19579](microsoft/aspire#19579), `@sebastienros`) - 🌐 **DevTunnel public URLs were missing from the Dashboard and MCP snapshots** — DevTunnel port resources could report `Running` and `Healthy` while showing no public URLs. Proxyless port allocation is now limited to compute and container resources, allowing DevTunnels to publish their actual public endpoints. Regression introduced in 13.5. Fixes [#19496](microsoft/aspire#19496). ([#19625](microsoft/aspire#19625), backport of [#19590](microsoft/aspire#19590), `@karolz-ms`, `@danegsta`) ### 🏷️ Housekeeping - 🚀 Bumped branding to 13.5.3 --- *Full Changelog: [v13.5.2...v13.5.3](microsoft/aspire@v13.5.2...v13.5.3)* *Full commit: [b5f143315ffb6968ea939a9978797a5b20e4c688](microsoft/aspire@b5f143315ffb6968ea939a9978797a5b20e4c688)* ## 13.5.2 ## What's New in Aspire 13.5.2 Patch release for Aspire 13.5 that removes an unused native helper binary from the Windows CLI archives so 13.5 servicing releases stay publishable to WinGet. ### 🐛 Fixes - 🪟 **Windows CLI archives shipped an unused ~4.9 MB `hex1bpty.exe`** — The Windows CLI archives (`aspire-cli-win-{x64,arm64}-*.zip`) bundled Hex1b's out-of-process PTY host, which Aspire never executes (DCP owns every pseudo-terminal Aspire surfaces). Besides the wasted download, the extra unexplained executable stalled the WinGet publish, since every binary in the archive goes through executable and malware validation. A build-only MSBuild target now drops the file from the CLI publish output; Unix native assets are unaffected. Regression new in 13.5. ([[#19557](https://github.com/microsoft/aspire/pull/19557)](https://github.com/microsoft/aspire/pull/19557), backport of #19554, `@mitchdenny`) ### 🏷️ Housekeeping - 🚀 Bumped branding to 13.5.2 *Full Changelog: [[v13.5.1...v13.5.2](https://github.com/microsoft/aspire/compare/v13.5.1...v13.5.2)](https://github.com/microsoft/aspire/compare/v13.5.1...v13.5.2)* *Full commit: [[a22cec24d76e764b3681977e314ab4a0aeed0240](https://github.com/microsoft/aspire/commit/a22cec24d76e764b3681977e314ab4a0aeed0240)](https://github.com/microsoft/aspire/commit/a22cec24d76e764b3681977e314ab4a0aeed0240)* ## 13.5.1 ## What's New in Aspire 13.5.1 Patch release for Aspire 13.5 fixing a TypeScript/Java polyglot AppHost compatibility regression when running the 13.5 SDK under an older (13.4.x) CLI, plus a DCP update and release-pipeline housekeeping. ### 🐛 Fixes - 🍎 **Polyglot AppHosts could crash on startup on macOS** — On macOS, polyglot (TypeScript/Python/Java/Go/Rust) AppHosts could crash during startup due to an interaction between how DCP's Go runtime forks detached processes and how .NET Native AOT installs its signal handlers. Updated DCP (Developer Control Plane) to 0.25.13 to resolve the crash. ([[#19528](https://github.com/microsoft/aspire/pull/19528)](https://github.com/microsoft/aspire/pull/19528)) - 🔗 **Polyglot AppHosts on the 13.5 SDK crashed under an older CLI with `MissingMethodException`** — A TypeScript or Java AppHost built with the 13.5 SDK failed to start when launched by an older (13.4.x) CLI, because the newer codegen called `Aspire.TypeSystem` members that don't exist in the CLI's older contract. Code generation now probes for these additive capabilities before using them, so older CLIs skip only the unsupported feature and startup succeeds. Regression introduced in 13.5 by #19365. Fixes #19503. ([[#19524](https://github.com/microsoft/aspire/pull/19524)](https://github.com/microsoft/aspire/pull/19524), backport of #19506, `@adamint`) ### 🏷️ Housekeeping - 📦 Updated DCP (Developer Control Plane) to 0.25.13 ([[#19528](https://github.com/microsoft/aspire/pull/19528)](https://github.com/microsoft/aspire/pull/19528)) - 🔧 Restored WinGet publication using .NET 9 `wingetcreate` ([[#19509](https://github.com/microsoft/aspire/pull/19509)](https://github.com/microsoft/aspire/pull/19509)) - 🧹 Removed the pipeline-scoped `Publish-Build-Assets` group from the release pipeline ([[#19523](https://github.com/microsoft/aspire/pull/19523)](https://github.com/microsoft/aspire/pull/19523), [[#19163](https://github.com/microsoft/aspire/pull/19163)](https://github.com/microsoft/aspire/pull/19163)) - 🚀 Bumped branding to 13.5.1 ([[#19531](https://github.com/microsoft/aspire/pull/19531)](https://github.com/microsoft/aspire/pull/19531)) *Full Changelog: [[v13.5.0...v13.5.1](https://github.com/microsoft/aspire/compare/v13.5.0...v13.5.1)](https://github.com/microsoft/aspire/compare/v13.5.0...v13.5.1)* *Full commit: [[69db530a4816698cf1d5fa4557933e0ac4f127c6](https://github.com/microsoft/aspire/commit/69db530a4816698cf1d5fa4557933e0ac4f127c6)](https://github.com/microsoft/aspire/commit/69db530a4816698cf1d5fa4557933e0ac4f127c6)* ## 13.5.0 # Aspire 13.5.0 Aspire 13.5 is a developer-experience release focused on a richer, more interactive AppHost, closer C# and TypeScript parity, sharper tooling, more flexible deployment modeling, and a broad set of runtime-stability improvements. ## Highlights - 💬 **Richer AppHost interactions** — The Interaction Service now works across C# and TypeScript AppHosts with stable prompts and dynamic inputs, file uploads, progress dialogs, notifications, and user-defined resource command arguments that surface as dashboard controls and CLI options. - 🖥️ **Interactive terminal sessions** — The experimental `WithTerminal()` API lets resources host REPLs, shells, TUIs, and other interactive programs directly in the dashboard, with an opt-in `aspire terminal` CLI command for attaching from your shell. - 🌐 **TypeScript AppHost is generally available** — Polyglot AppHosts no longer require the `ASPIREATS001` experimental diagnostic and gain custom health checks, container file copying, HTTPS developer certificates, faster startup, and several reliability fixes that further close the gap with C#. - 🛠️ **CLI installation and reliability** — The Aspire CLI is available through npm and Nix alongside Homebrew, WinGet, mise, and NuGet. New C# AppHosts enable the CLI bundle by default, while `aspire stop --force`, `aspire update --migrate`, `aspire doctor`, docs search, signal handling, and stale-socket cleanup all improve day-to-day workflows. - 🎨 **Refreshed dashboard** — The dashboard adopts official Aspire branding and a new accessible design-token system, with timestamp and exact numeric telemetry filters, console-log text search, clearer reconnect and health-check experiences, and correct telemetry streaming while filters are active. - 💻 **Rebranded VS Code extension** — The extension is now named **Aspire** and adds an in-editor dashboard, Bun and MAUI debugging, resource commands in the tree view, discovered AppHosts, improved parameter handling, and more efficient workspace discovery. - ☸️ **More expressive deployments** — Kubernetes and AKS gain first-class persistent volumes, Azure Container Apps adds deterministic unique resource naming, Azure environments support delegated subnets, and Docker Compose can publish Blazor gateways and configure shared memory. - ☁️ **Expanded hosting integrations** — Azure resources can be referenced across resource groups, subscriptions, and tenants; the new `Aspire.Hosting.Dotnet` package models .NET projects by path; Radius deployment arrives in preview; and Foundry Local, Redis modules, dev tunnels, Go debugging, and other integrations gain new capabilities. ##⚠️ Breaking changes Notable changes include hosting context `ServiceProvider` properties being renamed to `Services`, `PublishAsConnectionString` becoming obsolete in favor of `AddConnectionString`, removal of `aspire ps --resources` and `--include-hidden` in favor of `aspire describe`, earlier proxyless endpoint port allocation, deprecation of the GitHub Models integration, removal of the dashboard AI Assistant, and opt-in rather than automatic dashboard launch from the VS Code extension. See the full list and migration guidance in the [Aspire 13.5 breaking changes](https://aspire.dev/whats-new/aspire-13-5/#breaking-changes). ## 📖 Learn more For complete details, examples, migration guidance, and everything new in this release, read [What's new in Aspire 13.5](https://aspire.dev/whats-new/aspire-13-5/). Thank you to all the community contributors who helped make Aspire 13.5 possible! 💜 --- _Full Changelog: [v13.4.6...v13.5.0](microsoft/aspire@v13.4.6...v13.5.0)_ _Full commit: [e076d8e427cb3afb528dbd605acd74c3aea69f94](microsoft/aspire@e076d8e427cb3afb528dbd605acd74c3aea69f94)_ Commits viewable in [compare view](microsoft/aspire@v13.4.6...v13.5.3). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris Cavell <cdcavell@gmail.com>
Description
After upgrading to Aspire 13.5, DevTunnel port resources could reach
RunningandHealthywhile the Dashboard and MCP resource snapshots still reported no URLs.The proxyless endpoint allocator introduced in #17924 assigned a temporary localhost port to every unported proxyless endpoint, including
DevTunnelPortResource. Because DevTunnels used an existing allocation as the signal thatResourceEndpointsAllocatedEventhad already run, it replaced the temporary endpoint with the public tunnel endpoint without publishing the URL update.This change limits automatic proxyless port allocation to
IComputeResourceinstances and containers. Executable, container, and project resources retain the allocation behavior from #17924, while integration-owned endpoints such as DevTunnel ports remain unallocated until their integration publishes the real endpoint. Regression coverage also explicitly guardsDotnetProjectResourceas a compute resource.User-facing usage
Existing DevTunnel AppHosts now publish their public URLs again without code changes.
C#
TypeScript
Validation
DotnetProjectResourcecompute-resource classification coverage.Fixes #19496
Checklist
<remarks />and<code />elements on your triple slash comments?