Expose endpoint property expressions to ATS#16540
Expose endpoint property expressions to ATS#16540sebastienros merged 5 commits intomicrosoft:mainfrom
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16540Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16540" |
There was a problem hiding this comment.
Pull request overview
This PR fixes #15868 by exporting EndpointReference.Property(EndpointProperty) through ATS so polyglot SDKs (TypeScript/Python/Java) can construct endpoint property expressions (e.g., building http://{Host}:{Port}) rather than only referencing the endpoint as a whole.
Changes:
- Exports
EndpointReference.Property(EndpointProperty)(previously ignored by ATS) to enable endpoint-property expressions in generated SDKs. - Regenerates TypeScript, Python, and Java SDK snapshot outputs to include the new
property(...)capability. - Updates the polyglot validation AppHosts (TS/Python/Java) to build and use an endpoint URL expression from
Host+Port.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/PolyglotAppHosts/Aspire.Hosting/TypeScript/apphost.ts | Uses EndpointProperty.Host/Port via endpoint.property(...) to form a URL expression and sets it as an env var. |
| tests/PolyglotAppHosts/Aspire.Hosting/Python/apphost.py | Builds a URL ReferenceExpression from endpoint Host/Port property expressions and uses it in environment configuration. |
| tests/PolyglotAppHosts/Aspire.Hosting/Java/AppHost.java | Builds a URL expression from endpoint HOST/PORT property expressions and uses it in environment configuration. |
| tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts | Snapshot update adding EndpointReference.property(EndpointProperty) to the generated TS surface. |
| tests/Aspire.Hosting.CodeGeneration.Python.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.py | Snapshot update adding EndpointReference.property(...) to the generated Python surface. |
| tests/Aspire.Hosting.CodeGeneration.Java.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.java | Snapshot update adding EndpointReference.property(EndpointProperty) to the generated Java surface. |
| src/Aspire.Hosting/ApplicationModel/EndpointReference.cs | Exports the Property(EndpointProperty) API via [AspireExport] so ATS can surface it in generated SDKs. |
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
Expose EndpointReference.Property through ATS so generated polyglot SDKs can construct endpoint property expressions such as Host and Port. Update the TypeScript, Python, and Java polyglot validation apphosts and generated SDK snapshots for the new method. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove inaccurate default-value wording from EndpointReference property docs and normalize the Python codegen snapshot to UTF-8 without BOM. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update Go and Rust generated SDK snapshots for the exported EndpointReference.Property capability. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the Go and Rust verified snapshots to match the generated endpoint property output verified by their local codegen test projects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
04f69ec to
7dac37f
Compare
|
Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
Matched test failure patterns (1 test)
|
Description
Fixes #15868
TypeScript AppHosts could already reference endpoint properties conceptually through the C#
EndpointPropertyenum, butEndpointReference.Property(...)was explicitly ignored by ATS, so generated SDKs could not construct expressions such ashttp://${Host}:${Port}from endpoint properties.This exposes
EndpointReference.Property(EndpointProperty)through ATS, refreshes the generated TypeScript, Python, and Java SDK snapshots, and updates the polyglot validation AppHosts to build an endpoint URL fromHostandPortendpoint properties.Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: