Fix default publish output path for TypeScript AppHosts#16157
Fix default publish output path for TypeScript AppHosts#16157sebastienros merged 7 commits intomainfrom
Conversation
Prefer the resolved AppHost directory over the helper server working directory when pipeline output path is not specified. This keeps TypeScript AppHost publish output under the workspace instead of ~/.aspire/bundle-hosts, adds a hosting regression test, and adds a TypeScript publish regression test gated to current CLI bits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes aspire publish default output location for TypeScript/polyglot AppHosts by using the resolved AppHost directory instead of the helper host process working directory, and adds regressions to prevent backsliding.
Changes:
- Update
PipelineOutputServiceto default output underAppHost:Directory/aspire-output(falling back toEnvironment.CurrentDirectory). - Add a hosting unit test validating the new default output path behavior.
- Add an E2E TypeScript publish regression test verifying
docker-compose.yamllands in the default output directory.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/Aspire.Hosting.Tests/DistributedApplicationBuilderTests.cs | Adds unit coverage ensuring pipeline output defaults to the AppHost directory. |
| tests/Aspire.Cli.EndToEnd.Tests/TypeScriptPublishTests.cs | Adds an E2E regression test for TypeScript publish default output placement. |
| src/Aspire.Hosting/Pipelines/PipelineOutputService.cs | Changes default output path resolution to use AppHost:Directory from configuration. |
Update the pipeline output service contract and publish help text to match the new AppHost-relative default output location. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avoid resolving the AppHost directory when an explicit output path is already configured, fall back cleanly when AppHost directory canonicalization fails, clarify the AppHost directory wording, and include the generated XLF updates from the publish help text change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16157Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16157" |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
radical
left a comment
There was a problem hiding this comment.
1 finding: test coverage gap for error-handling fallback path.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| } | ||
| } | ||
|
|
||
| return Path.Combine(baseDirectory, "aspire-output"); |
There was a problem hiding this comment.
| return Path.Combine(baseDirectory, "aspire-output"); | |
| return Path.GetFullPath(baseDirectory, "aspire-output"); |
…hub.com/microsoft/aspire into sebastienros/sebros-fix-ts-publish-path
|
🎬 CLI E2E Test Recordings — 70 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #24438038058 |
…ctory The default output path for aspire publish is relative to the AppHost directory, not the current working directory. Update the documentation to match the clarified CLI help text from microsoft/aspire#16157. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Pull request created: #716
|
|
A documentation draft PR has been opened on What was updated: The description for the The draft PR needs human review before merging.
|
Description
aspire publishfor TypeScript/polyglot AppHosts was defaulting output under~/.aspire/bundle-hosts/...because the prebuilt remote host runs from that helper directory andPipelineOutputServicefell back to the process current directory.This change makes the default pipeline output path use the resolved AppHost directory from
AppHost:Directoryinstead. That keeps publish output under the real workspace while preserving the helper server's bundle-host working directory for generated files and restore artifacts.It also adds a hosting regression test for the default output path and a TypeScript publish regression test. The E2E test is gated to current CLI bits so it does not fail when run locally against the GA-installed CLI.
Fixes #15448
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: