Skip to content

[release/17.0] Unify CLI source onboarding, presentation, and selection - #22112

Closed
Mitch Denny (mitchdenny) wants to merge 1 commit into
mitchdenny-backport-21883-to-17-0from
mitchdenny-backport-21855-to-17-0
Closed

Mitch Denny (mitchdenny) wants to merge 1 commit into
mitchdenny-backport-21883-to-17-0from
mitchdenny-backport-21855-to-17-0

Conversation

@mitchdenny

Copy link
Copy Markdown
Member

Description

Backport of #21855 to release/17.0, layer 3 of 4 in the requested backport stack. This PR targets parent #22111 (mitchdenny-backport-21883-to-17-0), not the release branch directly. Ultimate target: release/17.0.

Stack order: #21831 (#22110) → #21883 (#22111) → #21855 (this PR) → #21852 (final quiet-Git layer forthcoming). Take the four layers as a set; this PR does not include the forthcoming quiet-Git patch.

Users get consistent source explanations, trust warnings, documentation links and source-aware template/integration selection. Native C# installation retains dependency feeds and existing package-source-mapping policy, including transactional rollback on failure.

Cherry-picked only source commit 4954c76a62bd091e0edbb02854c0dc2be06e64f5, with -x provenance. Applied without conflicts; stable patch ID 3cfbef28d4f8a064d7da78d58005081dde6b1ecb exactly matches the original. Parent verified unchanged at cb21675ee6951560134f1e2150fb88dbfe873af7 before application and after validation. No new dependencies or public library APIs.

Fixes # (issue)

User-facing usage

aspire new --use-config-source false declines a proposed configuration source without fetching it. Organizations can set ASPIRE_INIT_SOURCE_README_URL to an absolute HTTP(S) documentation URL. Configured source inventories appear in aspire new, aspire agent init, and aspire add.

Verified help from this backport build:

--use-config-source  Use the proposed Git configuration source. Specify false to decline it.
--non-interactive    Run the command in non-interactive mode, disabling all interactive prompts and spinners

Screenshots / Recordings

This exact backport changes CLI presentation. Original PR #21855 contains illustrative source-onboarding and picker screenshots; those are not live terminal captures of this backport. TODO: capture the release-stack build's configured-source onboarding, consent and multi-feed pickers for a live before/after comparison. No new screenshots or recordings were captured for this backport.

Validation

  • ./restore.sh — passed, 0 warnings, 0 errors.
  • The following focused CLI command — passed: 1,796 succeeded, 0 failed, 0 skipped:
MSBUILDTERMINALLOGGER=false ./dotnet.sh test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --configuration Release --no-restore --no-launch-profile -p:SkipNativeBuild=true -- --filter-class '*.AddCommandTests' --filter-class '*.AgentInitCommandTests' --filter-class '*.AgentInitClientSelectionTests' --filter-class '*.ConfigSourceCommandTests' --filter-class '*.ConfigSourceServiceTests' --filter-class '*.ConsoleInteractionServiceTests' --filter-class '*.NewCommandLocalTemplateTests' --filter-class '*.NuGetClientTests' --filter-class '*.NuGetPackageCacheTests' --filter-class '*.SkillSourceTests' --filter-class '*.PackageChannelTests' --filter-class '*.KnownEmojisTests' --filter-class '*.EmojiWidthTests' --filter-class '*.DotNetCliRunnerTests' --filter-class '*.DotNetTemplateFactoryTests' --filter-class '*.TemplateEngineFactoryGitTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'
  • MSBUILDTERMINALLOGGER=false ./dotnet.sh build tests/Aspire.Cli.EndToEnd.Tests/Aspire.Cli.EndToEnd.Tests.csproj --configuration Release --no-restore -p:SkipNativeBuild=true — passed, 0 warnings, 0 errors. Terminal E2E scenarios were not executed.
  • ./dotnet.sh exec artifacts/bin/Aspire.Cli/Release/net11.0/aspire.dll new --help — passed.
  • git diff HEAD^ HEAD --check — reports the same four intentional generated-snapshot EOF blank lines as the original patch; left unchanged to preserve exact output and patch identity. Worktree is clean after validation.
  • Test-selection impact checked: demo scripts remain classified as manual/no GH-CI consumer; no test projects, runtime fixture dependencies or scheduling traits were added or changed.

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

Customer Impact

Users working with organization-provided configuration, templates, skills and integrations receive consistent source details and trust notices, can distinguish identical packages from different feeds, and avoid native installation failures caused by treating feed aliases as paths or excluding SDK/dependency feeds.

Testing

Release-stack validation passed all 1,796 focused CLI tests and built the affected terminal E2E project with no warnings or errors. Help output was checked. Linux terminal E2E scenarios and authenticated demo workflows were not executed locally.

Risk

Medium: changes span source onboarding, interactive selection, package discovery and native NuGet configuration. Existing consent and package-source-mapping policy are retained, rollback paths are covered by focused tests, and the backported patch is identical to the merged original.

Regression?

Unknown — the source PR does not identify a specific regressing release or commit.

(cherry picked from commit 4954c76)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@JamesNK

Copy link
Copy Markdown
Member

#22109

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.

2 participants