Skip to content

Show AppHost SDK version in aspire ps#16517

Merged
adamint merged 7 commits intomicrosoft:mainfrom
adamint:dev/adamint/issue16292-ps-sdk-version
May 1, 2026
Merged

Show AppHost SDK version in aspire ps#16517
adamint merged 7 commits intomicrosoft:mainfrom
adamint:dev/adamint/issue16292-ps-sdk-version

Conversation

@adamint
Copy link
Copy Markdown
Member

@adamint adamint commented Apr 28, 2026

Description

Fixes #16292

aspire ps now surfaces the AppHost SDK version from the v2 auxiliary backchannel in table output and JSON output as sdkVersion, with unknown values rendered as blank/null.

image

Validation:

  • dotnet test tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-restore --verbosity quiet -- --filter-class "*.PsCommandTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@adamint adamint requested a review from mitchdenny as a code owner April 28, 2026 07:23
Copilot AI review requested due to automatic review settings April 28, 2026 07:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 28, 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 -- 16517

Or

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

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.

Pull request overview

Updates aspire ps to surface the running AppHost’s Aspire SDK version by querying the auxiliary backchannel v2 “AppHost info” endpoint, and displays it in both table and JSON output (sdkVersion, blank/null when unknown).

Changes:

  • Extend the CLI backchannel abstraction with GetAppHostInfoV2Async and use it in PsCommand to populate sdkVersion.
  • Add an SDK column to the table output and include sdkVersion in JSON output (null when unknown/“unknown”).
  • Add unit tests and localizable resources for the new column header.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/Aspire.Cli.Tests/TestServices/TestAppHostAuxiliaryBackchannel.cs Updates the test backchannel stub to support the new v2 AppHost info call.
tests/Aspire.Cli.Tests/Commands/PsCommandTests.cs Adds tests validating sdkVersion in JSON/table output and introduces a JsonRpc-based test server helper.
src/Aspire.Cli/Commands/PsCommand.cs Adds SdkVersion to the serialized model, queries v2 AppHost info, and displays an SDK table column.
src/Aspire.Cli/Backchannel/IAppHostAuxiliaryBackchannel.cs Extends the interface with GetAppHostInfoV2Async.
src/Aspire.Cli/Resources/PsCommandStrings.resx Adds HeaderSdk string resource.
src/Aspire.Cli/Resources/PsCommandStrings.Designer.cs Adds strongly-typed accessor for HeaderSdk.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.cs.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.de.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.es.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.fr.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.it.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.ja.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.ko.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.pl.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.pt-BR.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.ru.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.tr.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.zh-Hans.xlf Adds HeaderSdk translation entry.
src/Aspire.Cli/Resources/xlf/PsCommandStrings.zh-Hant.xlf Adds HeaderSdk translation entry.
Files not reviewed (1)
  • src/Aspire.Cli/Resources/PsCommandStrings.Designer.cs: Language not supported

Comment thread src/Aspire.Cli/Commands/PsCommand.cs Outdated
Comment thread tests/Aspire.Cli.Tests/Commands/PsCommandTests.cs Outdated
Comment thread src/Aspire.Cli/Commands/PsCommand.cs Outdated
@JamesNK
Copy link
Copy Markdown
Member

JamesNK commented Apr 28, 2026

What does it look like?

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@adamint
Copy link
Copy Markdown
Member Author

adamint commented Apr 28, 2026

image

@adamint adamint marked this pull request as draft April 28, 2026 07:42
@adamint adamint requested a review from JamesNK April 29, 2026 04:36
@adamint adamint marked this pull request as ready for review April 29, 2026 04:36
@davidfowl
Copy link
Copy Markdown
Contributor

Use the assembly informational version, change the impl.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JamesNK
Copy link
Copy Markdown
Member

JamesNK commented Apr 29, 2026

What does it look like?

@JamesNK
Copy link
Copy Markdown
Member

JamesNK commented Apr 29, 2026

Will it have values like 13.3.0-pr.16502.g809f606f? That's pretty long. It's ok if you're using dev bits, but what would 13.2 stable output? Just 13.2.1?

@adamint
Copy link
Copy Markdown
Member Author

adamint commented Apr 29, 2026

Will it have values like 13.3.0-pr.16502.g809f606f? That's pretty long. It's ok if you're using dev bits, but what would 13.2 stable output? Just 13.2.1?

Packages like the daily preview have the preview part omitted. 13.2 stable outputs 13.2.4.0
image

@davidfowl

Copy link
Copy Markdown
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

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

We only use the first 3 numbers. Can you trim off the trailing .0 (forth number)

The dashboard displays this for its stable version (in settings sidebar):

Image

Can you look into what the dashboard does to get its version number?

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@adamint
Copy link
Copy Markdown
Member Author

adamint commented Apr 29, 2026

Addressed the version-display feedback in adamint/aspire@0c5f64333. aspire ps now normalizes AppHost SDK versions similarly to the dashboard display path by stripping build metadata and trimming a trailing fourth .0 component, with JSON/table coverage for stable and prerelease informational versions.

Comment thread src/Aspire.Cli/Commands/PsCommand.cs Outdated
@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.

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

  • Tests / Build native CLI archive (Linux) / Build CLI (linux-x64) - Failed step 'Build RID-specific packages' will be retried because the job log shows a likely transient infrastructure network failure. Matched pattern: /Unable to load the service index for source https:\/\/(?:pkgs\.dev\.azure\.com\/dnceng|dnceng\.pkgs\.visualstudio\.com)\/public\/_packaging\//i.

adamint and others added 2 commits May 1, 2026 13:30
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@adamint adamint enabled auto-merge (squash) May 1, 2026 18:13
@adamint adamint merged commit c5e20a0 into microsoft:main May 1, 2026
849 of 855 checks passed
@github-actions github-actions Bot added this to the 13.4 milestone May 1, 2026
@adamint
Copy link
Copy Markdown
Member Author

adamint commented May 1, 2026

/backport to release/13.3

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Started backporting to release/13.3 (link to workflow run)

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.

aspire ps should show the AppHost SDK version

4 participants