Fix Foundry ATS baseline#17671
Conversation
Update the generated stable ATS baseline for the hosted-agent API rename so the baseline exposes HostedAgentOptions and asHostedAgentExecutable, and drops the stale withComputeEnvironmentExecutable entries. 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 -- 17671Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17671" |
There was a problem hiding this comment.
Pull request overview
Updates the Foundry ATS release baseline so polyglot host comparisons reflect the current hosted-agent export shape (asHostedAgentExecutable(project, options?) plus the HostedAgentOptions DTO), and removes stale asHostedAgent()/withComputeEnvironmentExecutable entries that no longer match source.
Changes:
- Adds the
HostedAgentOptionsDTO to the ATS DTO Types section. - Adds
asHostedAgentExecutable(project, options?)capability entry. - Removes stale
asHostedAgent()and duplicatewithComputeEnvironmentExecutable(...)capability entries.
Show a summary per file
| File | Description |
|---|---|
| src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.ats.txt | Refresh baseline to match current hosted-agent polyglot exports. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
|
I don't understand why it's failing, the PR is removing withComputeEnvironmentExecutable |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PR microsoft#17671 owns the Foundry ATS baseline update; this branch should only contain the AppHost and CLI fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
❓ CLI E2E Tests unknown — 108 passed, 0 failed, 2 unknown (commit View all recordings
📹 Recordings uploaded automatically from CI run #26654025807 |
|
✅ No documentation update needed. docs_required → already documented by name Triggered signals (1): Evidence: The signal fired on the validation command in the PR body: The flags Per-signal docs evidence:
What this PR actually changes: Fixes the |
* Fix five `aspire ls` bugs from #17620 (L1–L5) Fixes #17615, #17620, #17621, #17624, #17626. - L1 (#17615): Remove the eager-migration block in ConfigurationHelper.RegisterSettingsFiles. Read commands like `aspire ls` no longer silently materialize an aspire.config.json next to a user's legacy .aspire/settings.json. Migration now happens lazily/explicitly via the existing write paths. - L2 (#17620): Drop the `silent` parameter from ProjectLocator.GetAppHostProjectFileFromSettingsAsync so the legacy branch unconditionally surfaces the migration warning, and surface the actual user-authored `.aspire/settings.json` path in the warning text rather than the auto-created `aspire.config.json` path. - L3 (#17621): Remove the dead post-emission `appHosts.Sort()` in LsCommand.FindAppHostsWithJsonStreamAsync (--stream emits candidates as they are discovered, so the sort had no effect on already-emitted output). Update the --stream option description and docs/specs/cli-output-formats.md to declare the arrival-ordered contract. - L4 (#17624): Add an IsValidConfiguredAppHostPath helper in ProjectLocator that rejects `\0` and Path.GetInvalidPathChars() before the path is passed to Path.IsPathRooted / Path.Combine. Wired into both the modern `aspire.config.json` (`appHost.path`) branch and the legacy `.aspire/settings.json` (`appHostPath`) branch. Validation is intentionally at the consumption point rather than in AspireConfigFile.Load, which has 12+ unrelated callers. Adds a new ConfiguredAppHostPathHasInvalidCharacters resource string and refreshes the xlf set via UpdateXlf. - L5 (#17626): Add PathNormalizer.ResolveSymlinks in src/Shared, a recursive segment-walker that canonicalizes intermediate symlinks (Directory.ResolveLinkTarget only reads exactly the path it is given, and returns the link target as stored on disk — so a single call on /tmp/x/y.cs does not unwrap /tmp -> /private/tmp, and following a link whose stored target is /var/.../app keeps the un-canonical /var prefix). The recursion has a hard depth limit of 40 and falls back to the un-resolved input on broken or circular links. Use it in AddSettingsAppHostCandidateAsync as a comparison key only — the surfaced AppHostProjectCandidate keeps its original FileInfo so the displayed path matches what the user authored in settings. Tests: 158 of 160 targeted tests pass (2 Windows-only skipped on macOS). New tests cover L1 (no migration on read), L2 (legacy warning references settings.json), L3 (arrival-order under --stream), L4 (NUL byte in modern and legacy branches), L5 (symlink dedupe via a node_modules-hosted link the discovery walk excludes), plus 5 unit tests on PathNormalizer.ResolveSymlinks itself. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address Aspire CLI PR feedback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use constants for AppHost config keys Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Deduplicate AppHost config casing on macOS Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Handle duplicate ATS capabilities Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert duplicate ATS compatibility fix PR #17671 owns the Foundry ATS baseline update; this branch should only contain the AppHost and CLI fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: adamint <adamratzman1@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description
The stable ATS baseline for Aspire.Hosting.Foundry still exposed the stale hosted-agent export names after the hosted-agent builder API update merged to main. This updates the generated ATS baseline so polyglot hosts see the current hosted-agent shape.
The baseline now includes
HostedAgentOptionsandasHostedAgent(project, options?), and removes the stalewithComputeEnvironmentExecutableentries. This intentionally does not update the generatedapi/*.cspublic API baseline.Validation:
./dotnet.sh test --project tests/Aspire.Hosting.Foundry.Tests/Aspire.Hosting.Foundry.Tests.csproj --no-launch-profile -- --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"(92 passed).Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?