Repository navigation
Only warn about CLI/SDK skew when the CLI is older - #20477
Conversation
Compare CLI and SDK versions directionally and use the target SDK during updates. Preserve unparseable-version fallback and update warning guidance and regression coverage. Fixes #20389 Co-authored-by: Copilot <[email protected]> Copilot-Session: e9b58819-1030-4a10-b494-48379b8c0353
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20477Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20477" |
Tests selector2 / 99 PR test projects · 4 PR jobs, from 18 changed files. Selected PR test projects (2 / 99)
Selected PR jobs (4)
How these were chosen — grouped by what changed📦 affected project 🧪 🧪 Job reasons
Selection computed for commit |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation matches the stated behavior and includes focused coverage for ordering, metadata, fallback, and update flows.
Review effort: Balanced
Findings: None
What changed in this PR
Updates CLI/SDK skew detection so warnings appear only when the CLI is older than the SDK used for code generation.
Changes:
- Uses SemVer precedence while ignoring build metadata.
- Compares
aspire updateagainst its target SDK version. - Updates warning text, localization sources, and regression coverage.
| File | Description |
|---|---|
src/Aspire.Cli/Projects/GuestAppHostProject.cs |
Implements directional skew detection and target-version comparison. |
src/Aspire.Cli/Resources/ErrorStrings.resx |
Updates warning guidance. |
src/Aspire.Cli/Resources/ErrorStrings.Designer.cs |
Regenerates the resource accessor documentation. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.cs.xlf |
Updates Czech localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.de.xlf |
Updates German localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.es.xlf |
Updates Spanish localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.fr.xlf |
Updates French localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.it.xlf |
Updates Italian localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.ja.xlf |
Updates Japanese localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.ko.xlf |
Updates Korean localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.pl.xlf |
Updates Polish localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.pt-BR.xlf |
Updates Brazilian Portuguese localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.ru.xlf |
Updates Russian localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.tr.xlf |
Updates Turkish localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.zh-Hans.xlf |
Updates Simplified Chinese localization source. |
src/Aspire.Cli/Resources/xlf/ErrorStrings.zh-Hant.xlf |
Updates Traditional Chinese localization source. |
tests/Aspire.Cli.Tests/Projects/GuestAppHostProjectSkewTests.cs |
Covers directional precedence and fallback behavior. |
tests/Aspire.Cli.Tests/Projects/GuestAppHostProjectTests.cs |
Covers target SDK handling during package updates. |
Files not reviewed (1)
- src/Aspire.Cli/Resources/ErrorStrings.Designer.cs: Generated file
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Pull request created: #1786
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#1786 targeting Updated the CLI/SDK skew warning docs (new message text, warns only when CLI is older, update-time target SDK comparison) in Note This draft PR needs human review before merging. |
Documents changes from microsoft/aspire#20477 by ``@davidfowl-unknown`` Targeting `release/13.6` — the latest release branch on `microsoft/aspire.dev` — because `release/14.0` (from the source PR milestone `14.0`) does not exist there. ## Why The source PR changes the CLI/SDK skew warning: it now appears only when the CLI is older than the SDK, build metadata is ignored, `aspire update` compares against the target SDK, and the message text was reworded (`CodegenVersionSkewWarning`). Triggered signals: `cli_resource_strings_changed`, `pr_body_has_cli_flag_mention`. ## Changes (updated pages) - `src/frontend/src/content/docs/get-started/troubleshooting.mdx` - `src/frontend/src/content/docs/app-host/typescript-apphost.mdx` > Generated by [PR Documentation Check](https://github.com/microsoft/aspire/actions/runs/36487180665) for #20477 · copilot · auto · 33.9 AIC · ⌖ 17 AIC · ⊞ 20.2K · [◷](https://github.com/search?q=repo%3Amicrosoft%2Faspire.dev+%22gh-aw-workflow-id%3A+pr-docs-check%22&type=pullrequests) <!-- gh-aw-agentic-workflow: PR Documentation Check, engine: copilot, model: auto, id: 36487180665, workflow_id: pr-docs-check, run: https://github.com/microsoft/aspire/actions/runs/36487180665 --> <!-- gh-aw-workflow-id: pr-docs-check --> <!-- gh-aw-workflow-call-id: microsoft/aspire/pr-docs-check --> Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com>
Description
Newer Aspire CLIs can run AppHosts pinned to older SDKs without a misleading version-skew warning. The warning now appears only when the CLI has lower SemVer precedence than the SDK; metadata-only differences remain ignored, and unparseable versions retain the existing case-insensitive comparison fallback.
During
aspire update, the warning compares against the target SDK instead of the stale on-disk config. This also prevents missing a warning when an update moves the SDK ahead of the CLI. Warning guidance now recommends updating the CLI rather than changing the AppHost SDK, with the corresponding localization files regenerated.Fixes #20389
Examples
13.6.0-pr.19847.g8be64f3a13.5.413.6.0-pr.19847.g8be64f3a13.6.013.1.0-preview.1.26218.113.1.0-preview.1.26227.113.5.413.5.4+abc123For example, with CLI
13.5.0, an update from SDK13.4.0to13.6.0warns about the target13.6.0, not the old13.4.0.Validation
dotnet build /t:UpdateXlf src/Aspire.Cli/Aspire.Cli.csproj --no-restoresucceeded.No new dependencies or public APIs.
Checklist
<remarks />and<code />elements on your triple slash comments?