Skip to content

[docs] Document proxyless endpoint port pre-allocation (Aspire 13.5)#1199

Open
aspire-repo-bot[bot] wants to merge 2 commits into
release/13.5from
docs/proxyless-on-demand-allocation-26f4fee58172e063
Open

[docs] Document proxyless endpoint port pre-allocation (Aspire 13.5)#1199
aspire-repo-bot[bot] wants to merge 2 commits into
release/13.5from
docs/proxyless-on-demand-allocation-26f4fee58172e063

Conversation

@aspire-repo-bot

@aspire-repo-bot aspire-repo-bot Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#17924 by @danegsta.

Why this PR is needed

Aspire 13.5 pre-allocates public host ports for dynamic proxyless endpoints before workload resources are created. This makes endpoint properties such as EndpointProperty.Port available during resource configuration, including patterns that pass an endpoint's allocated public port into environment variables.

The existing networking-overview page documents proxyless endpoints but does not cover this pre-allocation behavior or the configurable proxyless endpoint port range.

What changed

Updated src/frontend/src/content/docs/fundamentals/networking-overview.mdx to add a new subsection “Allocate ports for dynamic proxyless endpoints” under the existing ### Proxyless endpoints section. The new subsection:

  • Explains that Aspire 13.5 pre-allocates public host ports for dynamic proxyless endpoints before workload creation.
  • Describes fixed port behavior versus allocation from the proxyless endpoint port range.
  • Documents the default 10000-32767 range and the ASPIRE_PROXYLESS_ENDPOINT_PORT_RANGE override.
  • Provides C# and TypeScript AppHost examples showing how to expose an allocated endpoint port as an environment variable.
  • Notes that persistent resources reuse allocated proxyless endpoint ports from user secrets.

Files modified

  • src/frontend/src/content/docs/fundamentals/networking-overview.mdx — updated (new subsection added)

> Generated by PR Documentation Check for issue #17851 · sonnet46 3.3M ·

Documents the on-demand port allocation behavior for dynamic proxyless
container endpoints introduced in Aspire 13.5 (microsoft/aspire#17851).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label Jun 3, 2026
@aspire-repo-bot aspire-repo-bot Bot requested a review from karolz-ms June 3, 2026 00:11
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1199. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1199 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

@IEvangelist IEvangelist changed the base branch from release/13.4 to release/13.5 June 5, 2026 20:36
@IEvangelist IEvangelist marked this pull request as ready for review June 5, 2026 21:46
@IEvangelist IEvangelist self-requested a review as a code owner June 5, 2026 21:46
Copilot AI review requested due to automatic review settings June 5, 2026 21:46
@IEvangelist IEvangelist requested a review from danegsta June 5, 2026 21:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation to the inner-loop networking overview describing Aspire 13.5’s on-demand resolution behavior for proxyless container endpoints when those endpoints are referenced before container creation (to avoid deadlocks/failures in certain configuration patterns).

Changes:

  • Adds a new section explaining why proxyless container endpoint ports may be unavailable prior to container creation.
  • Documents Aspire 13.5’s on-demand port allocation behavior for early endpoint resolution.
  • Includes a C# AppHost example showing how to inject the endpoint port as an environment variable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


### Resolving proxyless container endpoints before container creation

Proxyless container endpoints normally defer host port assignment until DCP creates the container. This means that if you reference an endpoint in a `WithEnvironment` callback or similar configuration that runs before the container is fully built, the port may not yet be available, which can cause deadlocks or failures.

@IEvangelist IEvangelist left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source-of-truth branch mismatch — review skipped

Cannot verify this PR against microsoft/aspire.

PR base branch (microsoft/aspire.dev) release/13.5
Matching branch in microsoft/aspire does not exist
Latest release branch in microsoft/aspire release/13.4 (4f2189335)
Source PR cited in body microsoft/aspire# — merged to main, milestone 13.5

My review protocol requires using the matching microsoft/aspire release branch as the single source of truth for claim verification. Because no release/13.5 branch exists on microsoft/aspire yet (13.5 has not been cut), I cannot verify the API/CLI/config claims in this PR against an authoritative source code snapshot for that release.

Possible resolutions:

  1. Re-target this PR to release/13.4 in aspire.dev if the documented behavior is already present in 13.4.
  2. Wait until release/13.5 is cut in microsoft/aspire, then re-run review against that branch.

Skipping Phase B (doc-tester) as well — running it without the Phase A claim verification would produce an incomplete review per protocol.

@danegsta

danegsta commented Jun 5, 2026

Copy link
Copy Markdown
Member

This will soon become invalid due to microsoft/aspire#17924 which will switch 13.5 to pre-allocation of undefined proxyless ports.

@danegsta danegsta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need changes after another PR merges.

@IEvangelist IEvangelist requested a review from danegsta June 5, 2026 23:49
@IEvangelist

Copy link
Copy Markdown
Member

Source-of-truth branch mismatch — review feedback not applied

I checked the matching source-of-truth branch required by the docs-feedback protocol and cannot evaluate this PR yet.

PR base branch (microsoft/aspire.dev) release/13.5
Required source branch (microsoft/aspire) release/13.5
Result after git fetch origin --prune origin/release/13.5 does not exist
Latest available release branch in microsoft/aspire origin/release/13.4 (4f2189335)

Because there is no matching microsoft/aspire branch, I can't verify the review feedback or the documented behavior against an authoritative source snapshot. Per protocol, I'm leaving the PR unchanged and not resolving any threads. Once release/13.5 exists in microsoft/aspire (or the PR is retargeted to a branch that exists there), the feedback can be evaluated safely.

@IEvangelist

Copy link
Copy Markdown
Member

Source-of-truth branch mismatch - review feedback not applied

I checked the matching source-of-truth branch required by the docs-feedback protocol and cannot evaluate this PR yet.

PR base branch (microsoft/aspire.dev)
elease/13.5
Required source branch (microsoft/aspire)
elease/13.5
Result after git fetch origin --prune origin/release/13.5 does not exist
Latest available 13.x release branch in microsoft/aspire origin/release/13.4 ($latest13_4)

Because there is no matching microsoft/aspire branch, I can't verify the review feedback or the documented behavior against an authoritative source snapshot. Per protocol, I'm leaving the PR unchanged and not resolving any threads. Once
elease/13.5 exists in microsoft/aspire or the PR is retargeted to a branch that exists there, the feedback can be evaluated safely.

@IEvangelist

Copy link
Copy Markdown
Member

Source-of-truth branch mismatch - review feedback not applied

I checked the matching source-of-truth branch required by the docs-feedback protocol and cannot evaluate this PR yet.

PR base branch (microsoft/aspire.dev) release/13.5
Required source branch (microsoft/aspire) release/13.5
Result after git fetch origin --prune origin/release/13.5 does not exist
Latest available release branch in microsoft/aspire origin/release/13.4 (4f2189335)

Because there is no matching microsoft/aspire branch, I cannot verify the review feedback or the documented behavior against an authoritative source snapshot. Per protocol, I am leaving the PR unchanged and not resolving any threads. Once release/13.5 exists in microsoft/aspire (or the PR is retargeted to a branch that exists there), the feedback can be evaluated safely.

@danegsta

Copy link
Copy Markdown
Member

@copilot we need to re-evaluate these doc changes now that microsoft/aspire#17924 is merged.

Co-authored-by: danegsta <50252651+danegsta@users.noreply.github.com>

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@copilot we need to re-evaluate these doc changes now that microsoft/aspire#17924 is merged.

Re-evaluated after microsoft/aspire#17924 and updated the section to describe pre-allocation from the proxyless endpoint port range, fixed ports, persistent resource reuse, and added TypeScript parity. Addressed in aaab7dd.

Copilot AI changed the title [docs] Document proxyless container endpoint on-demand allocation (Aspire 13.5) [docs] Document proxyless endpoint port pre-allocation (Aspire 13.5) Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants