Repository navigation
[release/17.0] Quiet routine Git acquisition output - #22036
Closed
Mitch Denny (mitchdenny) wants to merge 1 commit into
Closed
Mitch Denny (mitchdenny) wants to merge 1 commit into
Mitch Denny (mitchdenny) wants to merge 1 commit into
Conversation
## Description Routine Git initialization/fetch/checkout output clutters Aspire workflows such as `aspire new`. Use Git's supported `--quiet` options to suppress success/progress output without suppressing authentication prompts or meaningful diagnostics. This PR was stacked on [#21855](#21855), which has now merged; it now targets `main`. The separate askpass layer remains [#21930](#21930). - Apply `--quiet` to repository initialization, shallow fetches, and detached checkouts. - Preserve complete stdout capture for refs, SHAs, and Git object contents. Explicit operations display captured stderr on success and failure without copying parsed stdout into console output or private diagnostics into logs/exception messages. - Keep background configuration-source diagnostics deferred until command exit through the existing notification path, including suppression for machine-readable invocations. Immutable operation-local Git clients/runners prevent background routing from changing concurrent foreground output; local queries and SSH preflight share the same routing. - Retain the original interactive Git/credential-helper/SSH behavior, inherited remote stderr and terminal input, bounded unattended safeguards, source consent/trust, cancellation, and timeout reporting. - Identify the template repository before authentication-capable Git calls, including non-default path/ref qualifiers. Distinct sources now have distinct fetch notices; HTTP URL credentials/query/fragment are redacted and markup is escaped. A comment at the rendering site explains why users need the destination before entering basic-auth credentials: an ambiguous prompt could send their password to the wrong server, where it could be logged. - Update related tests, console snapshots, localized notice resources, and documentation; address the test-helper argument validation and naming feedback. No project-template or askpass IPC changes are included here. Fixes # (issue) ### User-facing usage Existing commands are unchanged, for example: ```bash aspire new --use-config-source aspire update --config-source --yes --non-interactive ``` Routine Git acquisition messages disappear. Explicit acquisition errors remain immediate. Automatic configuration-source checks cannot interrupt command output or prompts with Git diagnostics; those diagnostics are deferred and are suppressed alongside advisory notices for machine-readable output. Template fetch notices identify each source before Git can prompt, for example: ```text Fetching templates from https://example.test/team/templates.git using Git. Git may prompt you to authenticate. ``` ### Validation **Passed: 1,237 targeted tests** on macOS ARM64 at revision `2965391214e1c73a52e70c1b18716471841932ee`: ```bash dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class '*.GitCommandRunnerTests' --filter-class '*.GitClientTests' --filter-class '*.ConfigSourceServiceGitTests' --filter-class '*.ConfigSourceServiceTests' --filter-class '*.ConfigSourceCommandTests' --filter-class '*.TemplateEngineFactoryGitCheckoutTests' --filter-class '*.TemplateEngineFactoryGitTests' --filter-class '*.NewCommandLocalTemplateTests' --filter-class '*.ConsoleInteractionServiceTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' ``` **Regression reproduced before the background-diagnostics fix:** all four real-runner cases failed because stderr was displayed before notification: ```bash dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-method '*.CompletedCheck_RealGitDiagnosticsAreDeferredUnlessMachineReadable' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' ``` Those cases now pass in the focused selection above. They exercise actual Git ref-resolution/fetch failures with the runner and configuration service sharing the same interaction service, verify deferred output after the CLI update notice, and verify JSON suppression. Additional coverage proves explicit acquisition remains immediate after a background check, operation-local handlers do not interfere with concurrent foreground output, successful warnings/failures preserve parsed stdout and safe classification, and existing auth, timeout, cancellation, SHA-1/SHA-256 and template behavior remains covered. New multi-source command cases verify distinct repository notices precede Git ref-resolution/fetch for both symbolic and pinned refs. Console coverage verifies custom path/ref display, default omission, HTTP credential redaction, markup escaping, and stderr routing. Eight updated console snapshots were reviewed. **Passed:** localized resource regeneration with zero warnings/errors: ```bash dotnet build /t:UpdateXlf src/Aspire.Cli/Aspire.Cli.csproj ``` **Passed:** `git diff --check`. **Not rerun locally:** Linux terminal-authentication E2E and Windows/live credential-manager UI validation. The earlier Linux archive attempt was blocked while cross-publishing the dashboard Native AOT payload from macOS: ```bash ./localhive.sh -o <session-output>/quiet-git-linux -r linux-arm64 --archive ``` After resolving the initial missing PowerShell dependency in the session-local tool directory, the build failed because `llvm-objcopy`/`objcopy` is unavailable. The E2E scenario was not run; generated template-localization build noise was removed and is not in this PR. ### Screenshots / Recordings > **This PR includes UI changes.** Please add screenshots or screen recordings so reviewers can evaluate the visual changes without running locally. > > - For before/after comparisons, place them side-by-side or label them clearly. > - For interactive changes (animations, transitions, new flows), prefer a short screen recording (GIF or video). > - If you cannot capture visuals now, note what scenario to test and mark this section as TODO. <!-- Add screenshots/recordings here --> Console snapshot diffs show the source-specific notices at 40- and 120-column widths, including custom path/ref qualifiers. TODO: Capture the existing interactive configuration-source SSH authentication scenario and confirm authentication prompts/diagnostics remain visible while routine fetch output is quiet. Automated output-routing coverage passes; the local Linux archive blocker is documented above. ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] 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 - [x] 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 - [x] No --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 575c3bc)
14 tasks
This comment has been minimized.
This comment has been minimized.
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-38-pr21852
branch
from
November 10, 2026 04:23
1038700 to
c39a06f
Compare
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-38-pr21852
branch
from
November 10, 2026 04:24
c39a06f to
1038700
Compare
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22036Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22036" |
Mitch Denny (mitchdenny)
marked this pull request as ready for review
November 10, 2026 05:10
Mitch Denny (mitchdenny)
requested review from
James Newton-King (JamesNK) and
David Fowler (davidfowl)
as code owners
November 10, 2026 05:10
Member
Author
|
Approved for inclusion in release/17.0. Do not merge yet. |
Contributor
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-38-pr21852
branch
from
November 10, 2026 06:04
1038700 to
700859d
Compare
This comment has been minimized.
This comment has been minimized.
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-38-pr21852
branch
from
November 10, 2026 06:32
700859d to
1038700
Compare
Contributor
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-38-pr21852
branch
from
November 10, 2026 07:47
1038700 to
700859d
Compare
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-38-pr21852
branch
from
November 10, 2026 08:42
700859d to
1038700
Compare
Contributor
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #21852 to
release/17.0(cherry-picked from 575c3bc with no modifications).Layer 38 of 55 in the release/17.0 backport stack; stacked on #22034.
Backport recommendation: No — Cosmetic CLI output change; depends on #21855.
Original and backport stable patch IDs match:
751ffdd39003dac6006048897ee29ed439365b66. Builds/tests not run for this unchanged cherry-pick.Backport of #21852
Checklist
<remarks />and<code />elements on your triple slash comments?