Skip to content

[release/13.2] Backport: Show anonymous dashboard URLs in aspire ps#15749

Merged
joperezr merged 1 commit intorelease/13.2from
backport/15731-to-release-13.2
Apr 1, 2026
Merged

[release/13.2] Backport: Show anonymous dashboard URLs in aspire ps#15749
joperezr merged 1 commit intorelease/13.2from
backport/15731-to-release-13.2

Conversation

@JamesNK
Copy link
Copy Markdown
Member

@JamesNK JamesNK commented Apr 1, 2026

Description

Backport of #15731 to release/13.2.

aspire ps left the Dashboard column empty when the AppHost was configured with anonymous dashboard access (ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS / DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS). This change makes the backchannel surface the dashboard base URL in anonymous mode so CLI output can display it.

Cherry-picked from 010f4a76a2 with two merge conflicts resolved (MCP-related code in AuxiliaryBackchannelRpcTarget.cs and DashboardUrlsHelper.cs that exists on release/13.2 but not on main).

Validation: All 1770 CLI tests pass, all 9 AuxiliaryBackchannelRpcTargetTests pass.

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-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
@JamesNK JamesNK requested a review from mitchdenny as a code owner April 1, 2026 07:34
Copilot AI review requested due to automatic review settings April 1, 2026 07:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 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 -- 15749

Or

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

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

Backport to release/13.2 fixing aspire ps dashboard URL display when the AppHost dashboard is configured for anonymous access by having the backchannel surface the base dashboard URL even when no browser token is configured.

Changes:

  • Update dashboard URL resolution to return the base URL when DashboardToken is not configured (anonymous/unsecured mode), while preserving /login?t=... URLs when a token exists.
  • Add hosting and CLI regression tests covering anonymous dashboard URL propagation into ps --format json.
  • Extend the test builder helper with an overload that accepts both ITestOutputHelper and command-line args.

Reviewed changes

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

Show a summary per file
File Description
tests/Aspire.Hosting.Tests/Utils/TestDistributedApplicationBuilder.cs Adds a helper overload to pass args + output helper for tests that need configuration-driven scenarios.
tests/Aspire.Hosting.Tests/Backchannel/AuxiliaryBackchannelRpcTargetTests.cs Adds a regression test ensuring anonymous dashboard mode returns the base URL via the auxiliary backchannel.
tests/Aspire.Cli.Tests/Commands/PsCommandTests.cs Adds a regression test verifying aspire ps --format json includes an anonymous dashboard URL.
src/Aspire.Hosting/Backchannel/DashboardUrlsHelper.cs Adjusts URL construction to return base URL when no browser token is configured; keeps Codespaces rewriting behavior.
src/Aspire.Hosting/Backchannel/BackchannelDataTypes.cs Updates documentation to reflect that returned URLs may be tokenized or plain depending on auth mode.
src/Aspire.Hosting/Backchannel/AuxiliaryBackchannelRpcTarget.cs Updates documentation to match the new “resolved dashboard URLs” behavior.
src/Aspire.Cli/Backchannel/IAppHostAuxiliaryBackchannel.cs Updates documentation for the dashboard URL state returned from the AppHost.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

🎬 CLI E2E Test Recordings — 52 recordings uploaded (commit 43e0ac6)

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
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
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ 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
InitTypeScriptAppHost_AugmentsExistingViteRepoAtRoot ▶️ 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
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 #23837405169

@joperezr joperezr added the Servicing-approved Approved for servicing release label Apr 1, 2026
@joperezr joperezr merged commit 17fd10a into release/13.2 Apr 1, 2026
504 of 507 checks passed
@joperezr joperezr deleted the backport/15731-to-release-13.2 branch April 1, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants