Skip to content

Merge release/13.2 into main after 13.2.0 release - #15540

Merged
Jose Perez Rodriguez (joperezr) merged 45 commits into
mainfrom
merge/release-13.2-to-main
Apr 1, 2026
Merged

Jose Perez Rodriguez (joperezr) merged 45 commits into
mainfrom
merge/release-13.2-to-main

Conversation

@joperezr

Copy link
Copy Markdown
Member

This PR merges the release/13.2 branch into main now that 13.2.0 has been released.

Note: This PR should be merged (not squashed) to preserve commit history.

…5323)

* Update package versions to 13.2.0 and enable stabilization in CI configuration

* Temporary marking some integrations as preview while we wait for Azure.Provisioning.PrivateDns package

* Update packaging service to set pre-release channel quality to 'Both' for pr hives

* Update CLI E2E version check to handle stabilized builds

When StabilizePackageVersion=true, aspire --version outputs just '13.2.0'
without a commit SHA suffix. Update VerifyAspireCliVersionAsync to check
for '13.2.0' which is present in both stable and prerelease version strings.
Suppress IDE0060 for the unused commitSha parameter rather than removing it,
so it can be restored when merging back to main.

Co-authored-by: Copilot <[email protected]>

* Skip preview-only packages in TypeScript polyglot validation

Packages with SuppressFinalPackageVersion=true only produce prerelease
versions, which causes aspire restore to fail when the build is stabilized
(it requests stable versions). Skip these packages until the build
infrastructure dynamically computes versions (#15335).

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
…ath to _appDirectoryPath/AppDirectoryPath in PrebuiltAppHostServer (#15332)

* Initial plan

* Remove Path.GetDirectoryName call and rename _appPath to _appDirectoryPath in PrebuiltAppHostServer

Co-authored-by: eerhardt <[email protected]>

* Rename AppPath property to AppDirectoryPath in IAppHostServerProject and implementations

Co-authored-by: eerhardt <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: eerhardt <[email protected]>
* Fix Foundry run-mode project restart

Ensure the default Foundry ACR is registered in run mode so project provisioning can restore its dependent outputs on restart.

Add a regression test covering run-mode default container registry registration for Foundry projects.

Co-authored-by: Copilot <[email protected]>

* Update Foundry run-mode test expectation

Adjust the Foundry run-mode project test to expect the default container registry to be modeled in the app resources now that restart provisioning depends on it.

Co-authored-by: Copilot <[email protected]>

* Block Foundry projects on local mode

Throw a clear InvalidOperationException when AddProject is combined with RunAsFoundryLocal in either order, and add tests covering both unsupported scenarios.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
* Fix Aspire.Hosting analyzer hookup

Co-authored-by: Copilot <[email protected]>

* Fix analyzer export after rebase

Co-authored-by: Copilot <[email protected]>

* Remove global namespace qualifiers

Co-authored-by: Copilot <[email protected]>

* Refresh codegen snapshots

Co-authored-by: Copilot <[email protected]>

* Fix TypeScript capability assertions

Co-authored-by: Copilot <[email protected]>

* Fix shared configuration export ignore

Co-authored-by: Copilot <[email protected]>

* Address analyzer review feedback

Co-authored-by: Copilot <[email protected]>

* Refresh container capability snapshot

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
…te (#15333)

* Consolidate WithEnvironment exports using AspireUnionAttribute

Merge the separate withEnvironment (string) and withEnvironmentExpression
(ReferenceExpression) polyglot exports into a single withEnvironment export
using [AspireUnion] to accept string | ReferenceExpression | EndpointReference.

This gives TypeScript AppHost users a single, clean API:
  await api.withEnvironment('KEY', 'value');
  await api.withEnvironment('KEY', refExpr`redis://${endpoint}`);
  await api.withEnvironment('KEY', endpoint);

Instead of requiring separate method names for each value type.

Also adds EndpointReference support which was previously unexported,
and handles object target type in AtsMarshaller.ConvertPrimitive for
correct union parameter deserialization.

Co-authored-by: Copilot <[email protected]>

* Expand WithEnvironment union with ParameterResource, ConnectionString, and IValueProvider fallback

- Add IResourceBuilder<ParameterResource> and IResourceBuilder<IResourceWithConnectionString> to the AspireUnion
- Add IValueProvider+IManifestExpressionProvider runtime fallback for extensibility (e.g. BicepOutputReference)
- Remove withEnvironmentEndpoint separate export (covered by union)
- Remove sync withEnvironmentCallback export, rename async to withEnvironmentCallback
- Update codegen snapshots

Co-authored-by: Copilot <[email protected]>

* Update TypeScript apphost environment usage

Co-authored-by: Copilot <[email protected]>

* Refresh polyglot codegen snapshots

Co-authored-by: Copilot <[email protected]>

* Add ReferenceExpression apphost coverage

Co-authored-by: Copilot <[email protected]>

* Fix TypeScript polyglot validation apphost

Co-authored-by: Copilot <[email protected]>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

* Make WithEnvironment union overload internal

Co-authored-by: Copilot <[email protected]>

* Address WithEnvironment review feedback

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: David Fowler <[email protected]>
Co-authored-by: Sebastien Ros <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
* Add TypeScript SDK refresh workflow

Co-authored-by: Copilot <[email protected]>

* Address TypeScript SDK workflow review comments

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
… versions (#15367)

* Add installer paths to CI trigger patterns

* Replace channel with artifactVersion in Homebrew cask generation

Stable builds publish CLI archives under a preview version path on ci.dot.net
(e.g. aspire/9.2.0-preview.1.12345/) while the tarball filename uses the real
stable version (aspire-cli-osx-arm64-9.2.0.tar.gz). The old code assumed the
same version appeared in both the URL path and filename.

Introduce --artifact-version to generate-cask.sh so the URL path segment and
the filename version can differ. Add --archive-root for computing SHA256 hashes
from locally-built archives instead of downloading from ci.dot.net.

Remove the --channel parameter and the separate [email protected];
only the stable aspire.rb template is used. Simplify dogfood.sh accordingly.

* Harden Homebrew prepare-stage validation

Add brew style --fix to auto-correct formatting before auditing. Detect whether
the cask is new upstream by querying the GitHub API and run brew audit with
--new when appropriate. Use HOMEBREW_NO_INSTALL_FROM_API=1 during install tests
to ensure the local tap cask is used rather than the Homebrew API cache.

Add proper cleanup traps for brew untap on exit. Make the install/uninstall
test conditional via a runInstallTest parameter. Write a validation-summary.json
artifact recording all check results so the publish step can verify that
prepare-stage validation actually ran and passed.

* Rewrite Homebrew publish to use GitHub REST and GraphQL API

Replace the gh CLI and git clone/push workflow with pure GitHub API calls via
Invoke-RestMethod. This removes the need for a git installation on the build
agent and avoids fork-clone race conditions.

Key changes:
- Fork Homebrew/homebrew-cask via API with polling for readiness
- Create/reset the PR branch and upload the cask file via the contents API
- Check whether upstream already has the exact same content and skip if so
- Require a passing validation-summary.json before submitting
- Create PRs as drafts; convert existing open PRs to draft via GraphQL
- Generate a rich PR body with a checklist of all validation steps
- Reference superseded closed PRs in the body when re-submitting

* Improve WinGet manifest generation and publishing

Apply the same artifactVersion split to the WinGet pipeline: the installer URL
path uses the artifact version while the package version uses the real stable
version. Update generate-manifests.ps1 and the prepare/publish templates
accordingly.

* Wire up artifactVersion in release and CI pipelines

Update the top-level pipeline files to pass artifactVersion instead of channel
to the Homebrew and WinGet templates. Add the new installer preparation and
publishing stages to the unofficial pipeline.

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

* Address installer publishing review feedback

Co-authored-by: Copilot <[email protected]>

* [release/13.2] Fix Homebrew publish URI escaping

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot <[email protected]>
…es (#15350)

* Improve CLI error messages for dependency and project creation failures

* Use Assert.Collection and Assert.Equal in NewCommandTests

* Fix DisplayLines markup test assertion
Add three context menu actions for endpoint URL tree items in the
Running AppHosts tree view:
- Copy URL to Clipboard
- Open in External Browser
- Open in Simple Browser

Introduces EndpointUrlItem TreeItem subclass with contextValue
'endpointUrl' to enable context menu targeting, replacing the
generic DetailItem for endpoint URLs.

Fixes #15345

Co-authored-by: Mitch Denny <[email protected]>
Co-authored-by: Copilot <[email protected]>
* Add API Review Agent Skill

This skill allows us to automate parts of the API reviews that we do.

* updates - tag the original author in the comment

* Address PR review feedback on api-review skill

- Fix description to say 'developer who introduced each API (via git blame)'
  instead of 'PR author' to avoid misdirected attribution
- Replace broken gh api --jsonArray bash example with Python script using
  json.dump + gh api --input (--jsonArray is not a real gh flag)
- Provide non-empty review body instead of empty string to avoid API rejection

Co-authored-by: Copilot <[email protected]>

* Add deduplication check to api-review skill

Before posting review comments, the skill now checks for existing
API review comments by the current user on the PR. If found, it
skips duplicates, updates changed findings, and only posts net-new
findings. This prevents duplicate comments when the skill runs
against the same PR multiple times.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
…ostPath (#15352)

* Fix legacy settings migration path adjustment

When migrating from .aspire/settings.json to aspire.config.json, the
appHostPath was copied verbatim. But .aspire/settings.json stores paths
relative to the .aspire/ directory (e.g., '../src/apphost.ts'), while
aspire.config.json stores paths relative to its own directory (the
project root). This caused the migrated path to resolve incorrectly.

The fix re-bases the appHostPath during migration: resolves it against
the legacy .aspire/ directory, then makes it relative to the config
directory. For example, '../src/apphost.ts' becomes 'src/apphost.ts'.

Includes unit tests for the path adjustment and an E2E test that
verifies the full migration scenario with a TypeScript apphost in a
subdirectory.

Co-authored-by: Copilot <[email protected]>

* Fix E2E test: use grep instead of terminal buffer check

The terminal buffer accumulates all output, so the earlier echo of
legacy settings.json content (containing '../src/apphost.ts') would
cause false matches when verifying the migrated aspire.config.json.

Use 'grep' with the exact JSON key-value pattern to isolate the check,
and rely on the host-side file verification as the primary assertion.

Co-authored-by: Copilot <[email protected]>

* Fix E2E test: keep TS project intact, use robust patterns

The previous test moved apphost.ts to src/ but left .modules/ in the
workspace root, breaking TS imports. aspire run couldn't start, so the
migration never triggered and aspire.config.json was never created.

Changes:
- Keep apphost.ts at workspace root (project stays valid)
- Test re-basing with '../apphost.ts' -> 'apphost.ts' instead
  (same code path as '../src/apphost.ts' -> 'src/apphost.ts')
- Wait for 'Press CTRL+C' or 'Apphost failed' instead of generic
  'ERR:' which could false-match shell prompt patterns

Co-authored-by: Copilot <[email protected]>

* Fix E2E test: poll host filesystem instead of parsing terminal

Previous approach failed because:
1. aspire run error messages varied by failure mode
2. Terminal buffer pattern matching was fragile across exit codes

Now polls the host-side filesystem via bind mount for aspire.config.json,
which is created during apphost discovery before the actual run attempt.
This works regardless of whether aspire run succeeds or fails.

Co-authored-by: Copilot <[email protected]>

* Address PR feedback: normalize separators, guard empty paths, add tests

- Normalize backslash separators to OS-native before Path operations,
  then always output forward slashes (matching storage convention)
- Guard against empty/whitespace paths to avoid converting '' to '.'
- Use { Length: > 0 } pattern match instead of separate null check
- Rename misleading test to clarify .aspire/-relative semantics
- Add tests: backslash normalization, output always uses '/',
  deeply nested paths, empty path preservation, null path handling

Co-authored-by: Copilot <[email protected]>

* Replace unrealistic test with realistic subdirectory path scenario

The previous test used 'apphost.ts' without '../' prefix, which would
mean the apphost lives inside .aspire/ — an impossible real-world
scenario. Replace with a realistic .csproj-in-subdirectory case:
'../MyApp.AppHost/MyApp.AppHost.csproj' -> 'MyApp.AppHost/MyApp.AppHost.csproj'

Co-authored-by: Copilot <[email protected]>

* Use PathNormalizer for migration path re-basing

Replace manual slash normalization + GetFullPath with the existing
PathNormalizer.NormalizePathForCurrentPlatform() utility, which does
the same thing in one call.

Co-authored-by: Copilot <[email protected]>

* Add NormalizePathForStorage helper and additional path tests

Address review feedback:
- Extract PathNormalizer.NormalizePathForStorage() for the common
  backslash-to-forward-slash normalization used when persisting paths.
- Add tests for ./path, bare relative path, Unix rooted, and Windows
  rooted legacy migration scenarios.

Co-authored-by: Copilot <[email protected]>

* Use realistic paths in migration tests

Avoid test paths that imply apphost lives under .aspire/ since that
never happens in practice.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Mitch Denny <[email protected]>
Co-authored-by: Copilot <[email protected]>
* Secure AppHost RPC with session token handshake

Co-authored-by: Copilot <[email protected]>

* Fix TypeScript RPC authentication request

Co-authored-by: Copilot <[email protected]>

* Address AppHost RPC auth review feedback

Co-authored-by: Copilot <[email protected]>

* Update SDKs with token checks

* Move scoped registrations to correct location

* Consolidate temporary AppHost sessions

Co-authored-by: Copilot <[email protected]>

* Address PR review feedback

Co-authored-by: Copilot <[email protected]>

* Fix CI regressions after branch drift

Sync the AppHost server project contract with current release/13.2 and make the RemoteHost authentication test tolerate the expected disconnect race after failed auth.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
…#15375)

* Clean up Aspire panel: context menus, loading state, welcome messages

Adds initial 'loading' screen, new context menus for resources, endpoints,
apphost, and PID nodes. Consolidates previous 3 commits into one for clean
rebase onto main.

* remove unused strings

* remove comands on resources node, update string
Use stable Azure.Provisioning.PrivateDns and remove SuppressFinalPackageVersion on these two packages so they ship stable.

Fix #15328
* Fix brittle CPM CLI E2E test

Co-authored-by: Copilot <[email protected]>

* Harden CPM E2E prompt handling

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Sebastien Ros <[email protected]>
Co-authored-by: Copilot <[email protected]>
* API Review Feedback

Fixing some API review comments.

* Remove unused attribute.
* Use home-based CLI cache and socket paths

Co-authored-by: Copilot <[email protected]>

* Share CLI identifier hashing helpers

Co-authored-by: Copilot <[email protected]>

* Add legacy backchannel hash fallback

Co-authored-by: Copilot <[email protected]>

* Align CLI socket and NuGet helpers

Co-authored-by: Copilot <[email protected]>

* Update src/Shared/BackchannelConstants.cs

Co-authored-by: James Newton-King <[email protected]>

* Remove unshipped SHA socket fallback

Co-authored-by: Copilot <[email protected]>

* Revert NuGet cache relocation

Co-authored-by: Copilot <[email protected]>

* Simplify CliPathHelper

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: James Newton-King <[email protected]>
Co-authored-by: Eric Erhardt <[email protected]>
* Fix dashboard GHCP

* Add comment

* Fix dashboard tests for non-nullable resourceName parameter

* Apply suggestions from code review

Co-authored-by: Eric Erhardt <[email protected]>

---------

Co-authored-by: Eric Erhardt <[email protected]>
* Mark code generation packages as preview

Co-authored-by: Copilot <[email protected]>

* Mark code generation packages experimental

Co-authored-by: Copilot <[email protected]>

* Internalize code generation implementations

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
* Include packages/restore in aspire cache clear

The cache clear command was not clearing ~/.aspire/packages/ which contains
restored NuGet packages for apphost server sessions. When the CLI binary is
updated but the cached DLLs have the same version string, stale packages
persist and cause failures (e.g. missing auth handshake in transport.ts).

Co-authored-by: Copilot <[email protected]>

* Address review feedback: extract helper, use EnumerateFiles, add tests

- Extract ClearDirectoryContents helper to deduplicate directory-clearing logic
- Use EnumerateFiles with IgnoreInaccessible instead of GetFiles to handle
  inaccessible paths gracefully during enumeration
- Add tests for packages directory clearing, skip predicate, null/nonexistent
  directory handling

Co-authored-by: Copilot <[email protected]>

* Fix test: use WorkspaceRoot instead of WorkingDirectory

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Microsoft.Bcl.Memory 10.0.0 has a known high severity vulnerability
(GHSA-73j8-2gch-69rq) - a denial of service via out-of-bounds read
when decoding malformed Base64Url input. Update to 10.0.5 which
includes the fix.

Co-authored-by: Mitch Denny <[email protected]>
Co-authored-by: Copilot <[email protected]>
* Add CodeLens and gutter decoration support for AppHost resources

* wip

* remove status bar strings from branch

* Add CodeLens, gutter decorations, and AppHost resource parsers for VS Code extension

- Add CodeLens provider showing resource state, actions (start/stop/restart), and view logs
- Add gutter decoration provider with colored status circles for resources
- Add C# and JS/TS AppHost resource parsers with registry pattern
- Add statementStartLine for multi-line fluent chain CodeLens positioning
- Add comment-skipping logic so CodeLens appears below comments, above code
- Extract shared resource state utilities and resource constants
- Add enableCodeLens and enableGutterDecorations settings
- Add comprehensive test coverage (parsers, CodeLens, resourceStateUtils)
- Only match parent resources (Add* calls), not implicit child resources (With* calls)

* Address Copilot review: conditional appHostPath, displayName preference, Unhealthy as error

- Guard --apphost flag when appHostPath is falsy in CodeLens commands
- Prefer displayName over name in two-pass resource matching
- Classify Unhealthy health status as error (not warning) to align with tree view

* bump extension version

* update config json
* Stabilize Aspire.Hosting.Docker package

Remove SuppressFinalPackageVersion to make the package ship as a stable
release. Add DisablePackageBaselineValidation since this is the first
stable version and there is no prior baseline to validate against.

Co-authored-by: Copilot <[email protected]>

* Fix tests for stable version

---------

Co-authored-by: Mitch Denny <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Eric Erhardt <[email protected]>
We shouldn't default to ~/.nuget/packages. Instead we should use NuGet defaulting logic.

Fix #15404

Co-authored-by: Eric Erhardt <[email protected]>
…ectory (#15415)

* [release/13.2] Store temporary AppHost service under user .aspire directory

Co-authored-by: Copilot <[email protected]>

* Update tests/Aspire.Cli.Tests/Projects/PrebuiltAppHostServerTests.cs

Co-authored-by: Copilot <[email protected]>

* Update tests/Aspire.Cli.Tests/Projects/PrebuiltAppHostServerTests.cs

Co-authored-by: Copilot <[email protected]>

* [release/13.2] Address PR review feedback

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…15383)

When 'aspire config set features.X true' writes a JSON string "true" instead
of a JSON boolean, AspireConfigFile.Load() fails to deserialize the
Dictionary<string, bool> Features property.

Fix by adding a FlexibleBooleanConverter that tolerates both JSON booleans and
JSON string representations of booleans. The converter is registered globally
via JsonSourceGenerationOptions.Converters so all bool properties benefit.

Also fix TryNormalizeSettingsFile to use DeepClone() instead of ToString()
when normalizing colon-separated keys, which was corrupting non-string types.

Co-authored-by: Mitch Denny <[email protected]>
Co-authored-by: Copilot <[email protected]>
…config.json to .NET templates (#15423)

* Add E2E test: config discovery from apphost directory

Adds a test that verifies aspire.config.json is discovered adjacent
to the apphost file when running from a parent directory, rather than
being recreated in the current working directory.

Co-authored-by: Copilot <[email protected]>

* Fix config discovery to search from apphost directory

When an apphost is found via recursive search, use its directory as the
search root for aspire.config.json (walking upward) instead of defaulting
to CWD. This prevents creating a duplicate config when the user runs
'aspire run' from a parent directory after 'aspire new'.

Changes:
- Add ConfigurationHelper.FindNearestConfigFilePath helper
- ProjectLocator.CreateSettingsFileAsync: skip creation when config
  already exists near the apphost with valid appHost.path
- GuestAppHostProject.GetConfigDirectory: search from apphost directory
  so launch profiles are read from the correct config

Co-authored-by: Copilot <[email protected]>

* Fix: only skip config creation when path matches discovered apphost

The previous check skipped creation whenever any appHost.path existed,
which broke config healing when the path was stale/invalid. Now we
resolve the stored path and only skip if it points to the same apphost
that was discovered via recursive search.

Co-authored-by: Copilot <[email protected]>

* Add aspire.config.json to .NET apphost templates

Include aspire.config.json with appHost.path in the aspire-apphost
(csproj) and aspire-apphost-singlefile templates so that aspire run
from a parent directory finds the config adjacent to the apphost
instead of creating a spurious one in the working directory.

The csproj template uses sourceName 'Aspire.AppHost1' so the template
engine substitutes the actual project name automatically.

Co-authored-by: Copilot <[email protected]>

* Add aspire.config.json to solution-level apphost templates

Add aspire.config.json at the solution root for aspire-empty,
aspire-starter, and aspire-ts-cs-starter templates. Each points to
the AppHost csproj via a relative path. The template engine
substitutes the sourceName so the path matches the actual project
name chosen by the user.

Co-authored-by: Copilot <[email protected]>

* Add aspire.config.json to aspire-py-starter template

Co-authored-by: Copilot <[email protected]>

* Address review feedback: fix legacy path handling, stale docs, dead code

- Fix legacy .aspire/settings.json path handling in ProjectLocator:
  resolve config root to parent of .aspire/ directory
- Update GetConfigDirectory XML doc to reflect new behavior
- Remove unused _configurationService field and constructor parameter
- Assert originalContent == currentContent in E2E test

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Mitch Denny <[email protected]>
Co-authored-by: Copilot <[email protected]>
* Fix Windows CLI backchannel socket path

* Respond to PR feedback

When using named pipes for the Guest AppHost, we need to just return a name, not a path.
@github-actions

Copy link
Copy Markdown
Contributor

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.

Read VersionPrefix dynamically from eng/Versions.props instead of
hardcoding a specific version. For non-stabilized builds (all normal
PR builds), also verify the commit SHA suffix for exact build identity.

This replaces the hardcoded '13.2.0' check that was added on the
release/13.2 branch and would fail when merged to main (13.3.0).

Co-authored-by: Copilot <[email protected]>
Mitch Denny and others added 3 commits March 25, 2026 12:29
…ync)

Take main's version which includes the newer _agentInitCommand.PromptAndChainAsync
pattern, replacing release/13.2's simpler error check.

Co-authored-by: Copilot <[email protected]>
On main, NewCommand no longer displays ProjectCouldNotBeCreated when
template apply fails — it delegates to PromptAndChainAsync which just
returns the exit code. Update tests from release/13.2 to match:

- C# test: expect DotNetTemplateFactory's ProjectCreationFailed message
- TypeScript test: just verify non-zero exit code (no error displayed)

Co-authored-by: Copilot <[email protected]>
Same class of merge issue: test from release/13.2 expected
ProjectCouldNotBeCreated error which NewCommand no longer displays
on main (replaced by PromptAndChainAsync). Remove the second error
assertion since only the aspire-restore failure message is displayed.

Co-authored-by: Copilot <[email protected]>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<IsPackable>true</IsPackable>
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
<DisablePackageBaselineValidation>true</DisablePackageBaselineValidation>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should remember to remove this line once this is in main and update the package baseline to 13.2.0

@joperezr

Copy link
Copy Markdown
Member Author

Merge conflict resolution notes

This merge had several non-trivial conflicts between release/13.2 and main. Here's a summary of the key decisions made during resolution. Tagging relevant owners for review.

1. Python auth token ported to PythonModuleBuilder.cs — Sébastien Ros (@sebastienros) Anna Tisch (@annatisch)

release/13.2 (PR #15344) added auth token authentication to the old transport.py and AtsPythonCodeGenerator.GenerateConnectionHelpers(). main (PR #13947) rewrote the Python code generator, deleting transport.py and moving connection code into PythonModuleBuilder.cs, but did not include the auth token flow.

During merge resolution, we:

  • Accepted main's deletion of transport.py
  • Added an authenticate() method to the AspireClient class in PythonModuleBuilder.cs (matching the old transport.py implementation)
  • Added auth token reading + client.authenticate(auth_token) to _get_client() in PythonModuleBuilder.ConnectionHelperCode

Please verify this is the correct approach for the new Python code generator architecture.

2. RestoreCommand.cs dead code removed — Sébastien Ros (@sebastienros)

release/13.2 (PR #15417) added packagesDir ??= SettingsUtility.GetGlobalPackagesFolder(settings) before the try block. main (PR #15416) moved settings loading inside the try block. During merge, we took main's version and dropped the packagesDir line since it was unused anywhere else in the file (GetGlobalPackagesFolder is already called directly at line 283 in BuildPackageSpec).

3. Step ordering (codegen before deps) — consistent across all paths

In GuestAppHostProject.cs and ScaffoldingService.cs, main reordered steps so code generation happens before dependency installation (because .modules must exist before dep files can reference it). release/13.2 refactored server lifecycle to use AppHostServerSession. We kept both: main's step order + release/13.2's AppHostServerSession pattern.

The release/13.2 merge renamed the AspireExport capability ID from
'waitFor' to 'waitForResource' (with MethodName='waitFor'). Update
the test assertion to match.

Co-authored-by: Copilot <[email protected]>
The DistributedApplicationBuilder.__enter__ was calling self._client.connect()
a second time after _get_client() had already connected and authenticated.
This created a new pipe connection that lost the authentication state, causing
'Client must authenticate before invoking AppHost RPC methods' errors.

Co-authored-by: Copilot <[email protected]>
@joperezr

Copy link
Copy Markdown
Member Author

🐛 Fix: Python client double-connect losing authentication state

Sébastien Ros (@sebastienros) Anna Tisch (@annatisch) — heads up on another merge artifact we found and fixed.

What happened: The Python polyglot validation CI was failing with:

Exception: Client must authenticate before invoking AppHost RPC methods.

Root cause: When we ported the auth token flow from release/13.2 into main's rewritten Python code generator (PythonModuleBuilder.cs), there was a subtle interaction:

  1. _get_client() correctly does: connect() → authenticate(auth_token) → returns authenticated client ✅
  2. But DistributedApplicationBuilder.__enter__() (from main's PR PythonAppHost Code Generator #13947) had a redundant self._client.connect() call that re-established the pipe connection, creating a new unauthenticated session
  3. Then invoke_capability('createBuilderWithOptions', ...) would fail because the new connection hadn't authenticated

This wasn't an issue before auth tokens existed (main had no auth requirement), and it wasn't an issue on release/13.2 (which had a different code structure). It only manifested when combining auth tokens + main's __enter__ pattern.

Fix: Removed the redundant self._client.connect() from __enter__. The client is already connected and authenticated by _get_client(), so the second connect() was both unnecessary and harmful. Java and TypeScript don't have this issue because their createBuilder() connects once and immediately invokes the capability in the same function.

Commit: 06cf3b7

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 55 recordings uploaded (commit 06cf3b7)

View recordings
Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
Banner_NotDisplayedWithNoLogoFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunEmptyAppHostProject ▶️ View Recording
CreateAndRunJavaEmptyAppHostProject ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateJavaAppHostWithViteApp ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View Recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View Recording
RunWithMissingAwaitShowsHelpfulError ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
TypeScriptAppHostWithProjectReferenceIntegration ▶️ View Recording

📹 Recordings uploaded automatically from CI run #23866943402

@joperezr

Copy link
Copy Markdown
Member Author

Looks like this is stuck on macos agents, but everything else is green. Merging now to prevent future merge conflicts.

@joperezr
Jose Perez Rodriguez (joperezr) merged commit 6a070e3 into main Apr 1, 2026
260 checks passed
@joperezr
Jose Perez Rodriguez (joperezr) deleted the merge/release-13.2-to-main branch April 1, 2026 20:38
@joperezr Jose Perez Rodriguez (joperezr) added this to the 13.3 milestone Apr 14, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

No documentation PR is required for this change.

This PR merges release/13.2 into main after the 13.2.0 release — it's a branch sync/housekeeping operation, not a feature introduction. All user-facing changes from the 13.2 release would have been documented when the individual feature PRs were originally merged.

Generated by PR Documentation Check · ● 87.8K · ◷

@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.