Skip to content

Store polyglot artifacts under the workspace .aspire folder#15991

Draft
IEvangelist wants to merge 4 commits intomicrosoft:mainfrom
IEvangelist:dapine/issue-15967-workspace-aspire
Draft

Store polyglot artifacts under the workspace .aspire folder#15991
IEvangelist wants to merge 4 commits intomicrosoft:mainfrom
IEvangelist:dapine/issue-15967-workspace-aspire

Conversation

@IEvangelist
Copy link
Copy Markdown
Member

@IEvangelist IEvangelist commented Apr 9, 2026

Summary

  • resolve the polyglot workspace root from aspire.config.json (or legacy .aspire/settings.json) and store workspace-scoped CLI artifacts under <workspace>/.aspire/..., including bundled restore output and prebuilt AppHost staging
  • add a project-root .gitignore entry for .aspire/ to generated TypeScript, Python, and Java projects so the new workspace-local artifact folder stays untracked by default
  • preserve an existing root .gitignore when scaffolding a polyglot AppHost by appending missing ignore entries instead of overwriting the file, and fail scaffolding if any other returned project files already exist

Fixes #15967.

Testing

  • dotnet test tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj -- --filter-class Aspire.Cli.Tests.Templating.TemplateGitIgnoreTests --filter-class Aspire.Cli.Tests.Scaffolding.ScaffoldingServiceTests
  • dotnet build tests/Aspire.Cli.EndToEnd.Tests/Aspire.Cli.EndToEnd.Tests.csproj
  • previously validated CLI coverage for the workspace-local artifact paths in ConfigurationHelperTests, BundleNuGetServiceTests, and PrebuiltAppHostServerTests
  • manual CLI smoke: aspire new ts-starter and aspire new ts generated a project-root .gitignore containing the .aspire/ entry

Move prebuilt AppHost staging and bundled restore output into the workspace-local .aspire directory, add default .gitignore coverage for generated polyglot projects, and cover the behavior with CLI tests.

Co-authored-by: Copilot <[email protected]>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15991

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15991"

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

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.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

IEvangelist and others added 3 commits April 9, 2026 10:33
Use OS-neutral path composition in TemplateGitIgnoreTests so the starter template .gitignore assertions work on Ubuntu runners as well as Windows.

Co-authored-by: Copilot <[email protected]>
Root the generated .aspire ignore entry at /.aspire/, merge it into an existing root .gitignore instead of overwriting it, and fail scaffolding when other returned files already exist.

Co-authored-by: Copilot <[email protected]>
Keep the project-root .gitignore behavior and safe merge logic, but revert the generated ignore entry itself back to .aspire/ to match the intended template output.

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Store polyglot AppHost restore artifacts under the workspace instead of ~/.aspire/packages/restore

1 participant