Skip to content

[cli] Shorten install script download logging#15405

Merged
DamianEdwards merged 4 commits intomainfrom
damianedwards/install-script-url-tweak
Mar 20, 2026
Merged

[cli] Shorten install script download logging#15405
DamianEdwards merged 4 commits intomainfrom
damianedwards/install-script-url-tweak

Conversation

@DamianEdwards
Copy link
Member

Description

Shortens install-script download logging so the Bash and PowerShell installers stop printing full download URLs.

The scripts now derive compact descriptors from the existing URL structure and emit messages like Downloading aspire-cli-win-x64.zip from 'rc/daily' instead of echoing the raw URL. This applies to both CLI archive downloads and VS Code extension downloads, and also updates related dry-run / -WhatIf paths so they no longer surface the full URL through script messaging.

No dependencies are required for this change.

Validation:

  • pwsh -NoProfile -File .\eng\scripts\get-aspire-cli.ps1 -WhatIf -Quality staging -OS win -Architecture x64
  • pwsh -NoProfile -File .\eng\scripts\get-aspire-cli.ps1 -WhatIf -Quality dev -OS win -Architecture x64 -InstallExtension
  • C:\Program Files\Git\bin\bash.exe eng/scripts/get-aspire-cli.sh --dry-run --quality staging --os win --arch x64
  • C:\Program Files\Git\bin\bash.exe eng/scripts/get-aspire-cli.sh --dry-run --quality dev --os win --arch x64 --install-extension

Fixes # (issue)

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>
Copilot AI review requested due to automatic review settings March 19, 2026 22:02
@github-actions
Copy link
Contributor

github-actions bot commented Mar 19, 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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15405

Or

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

Copy link
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

This PR updates the Bash and PowerShell “get-aspire-cli” installers to avoid printing full download URLs in log/WhatIf output by deriving a compact “download descriptor” from known URL shapes.

Changes:

  • Add URL-to-descriptor helpers (get_download_descriptor / Get-DownloadDescriptor) and use them in download/validation logging.
  • Update download/validation error messages to reference the descriptor instead of the raw URL.
  • Adjust dry-run / -WhatIf messaging for CLI archive and VS Code extension downloads to avoid surfacing full URLs.

Reviewed changes

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

File Description
eng/scripts/get-aspire-cli.sh Introduces a descriptor helper and replaces URL logging in curl/download/validation paths.
eng/scripts/get-aspire-cli.ps1 Adds a descriptor helper and updates download/logging and ShouldProcess messaging to avoid full URLs.

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

radical commented Mar 19, 2026

nit: looks good overall. I noticed a small bit of dead code from the new descriptor plumbing: Invoke-FileDownload computes $downloadDescriptor but never uses it, and the bash script similarly computes download_descriptor in secure_curl() / validate_content_type() without consuming it. Not blocking, but it seems worth trimming to avoid a little extra work and future confusion.

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

@radical removed the dead code if you'd like to check again

@github-actions
Copy link
Contributor

🎬 CLI E2E Test Recordings — 52 recordings uploaded (commit 32cd873)

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
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ 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
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ 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 #23322032727

@DamianEdwards DamianEdwards merged commit e838b86 into main Mar 20, 2026
256 checks passed
@DamianEdwards DamianEdwards deleted the damianedwards/install-script-url-tweak branch March 20, 2026 00:19
@dotnet-policy-service dotnet-policy-service bot added this to the 13.3 milestone Mar 20, 2026
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.

3 participants