Skip to content

Store polyglot artifacts under the workspace .aspire folder#15991

Open
IEvangelist wants to merge 6 commits intomicrosoft:mainfrom
IEvangelist:dapine/issue-15967-workspace-aspire
Open

Store polyglot artifacts under the workspace .aspire folder#15991
IEvangelist wants to merge 6 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
  • flow an explicit temporary nuget.config into bundle restore for explicit channels and make the restore cache source-aware so same-version packages from different feeds no longer collide under the workspace .aspire restore cache
  • 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.
Addresses #15399.

Testing

  • dotnet test tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj -- --filter-class Aspire.Cli.Tests.NuGet.BundleNuGetServiceTests --filter-class Aspire.Cli.Tests.Packaging.TemporaryNuGetConfigTests --filter-class Aspire.Cli.Tests.Projects.PrebuiltAppHostServerTests
  • 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
  • manual CLI smoke: �spire new ts-starter and �spire new ts generated a project-root .gitignore containing the .aspire/ entry

@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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.

IEvangelist and others added 5 commits April 10, 2026 14:57
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 <223556219+Copilot@users.noreply.github.com>
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 <223556219+Copilot@users.noreply.github.com>
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 <223556219+Copilot@users.noreply.github.com>
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 <223556219+Copilot@users.noreply.github.com>
Flow an explicit temporary nuget.config into bundle restore for explicit channels and include source URLs in the bundle restore cache hash so staging restores stay isolated under the workspace .aspire directory.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@IEvangelist IEvangelist force-pushed the dapine/issue-15967-workspace-aspire branch from 6175cbc to 39ed7ee Compare April 10, 2026 20:00
@github-actions
Copy link
Copy Markdown
Contributor

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.
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.

Treat an existing root package.json as mergeable scaffold output so TypeScript brownfield init can augment existing repos after the rebase without tripping the no-overwrite guard.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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

2 participants