[release/13.2] Fix guest AppHost launch profile env propagation#15637
Open
sebastienros wants to merge 2 commits intorelease/13.2from
Open
[release/13.2] Fix guest AppHost launch profile env propagation#15637sebastienros wants to merge 2 commits intorelease/13.2from
sebastienros wants to merge 2 commits intorelease/13.2from
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15637Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15637" |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes environment-variable propagation from launch profiles to non-.NET “guest” AppHosts so they receive the same dashboard/OTLP/resource-service configuration as the temporary .NET AppHost server.
Changes:
- Merge launch-profile environment variables into the guest AppHost process environment for both
runandpublish. - Refactor launch-profile env handling into a shared merge helper while preserving the server’s default environment behavior.
- Add a regression test validating the shared merge behavior (context + launch profile + additional env).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Aspire.Cli/Projects/GuestAppHostProject.cs | Adds shared env-merge helper and applies it to guest process env for run/publish. |
| tests/Aspire.Cli.Tests/Projects/GuestAppHostProjectTests.cs | Adds regression test covering merged guest environment behavior. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🎬 CLI E2E Test Recordings — 52 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #23629525044 |
JamesNK
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes guest AppHost launch-profile environment propagation for non-.NET AppHosts on
release/13.2.The shared
GuestAppHostProjectlauncher was reading launch-profile values such asASPNETCORE_URLS,ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL, andASPIRE_RESOURCE_SERVICE_ENDPOINT_URL, but only passing them to the temporary .NET AppHost server. The actual guest process only received the remote socket/apphost variables, so TypeScript/Python/Java/Go/Rust AppHosts could miss the dashboard and OTLP endpoint configuration.This change merges launch-profile environment variables into the guest process environment for both
runandpublish, preserves the existing default environment behavior for the temporary server, and adds a regression test covering the shared merge path.Fixes # (issue)
Validation:
./restore.sh./dotnet.sh test tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj -- --filter-class "*.GuestAppHostProjectTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"./dotnet.sh run --project ./src/Aspire.Cli/Aspire.Cli.csproj -- restore --non-interactive --apphost playground/polyglot/TypeScript/Aspire.Hosting.SqlServer/ValidationAppHost/apphost.ts./dotnet.sh run --project ./src/Aspire.Cli/Aspire.Cli.csproj -- start --isolated --non-interactive -l debug --apphost playground/polyglot/TypeScript/Aspire.Hosting.SqlServer/ValidationAppHost/apphost.tsChecklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: