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.Testing](https://github.com/microsoft/aspire) from 13.5.2 to 13.5.3. <details> <summary>Release notes</summary> _Sourced from [Aspire.Hosting.Testing'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)* Commits viewable in [compare view](microsoft/aspire@v13.5.2...v13.5.3). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.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?