Preserve CLI status messages without interactive spinners - #19272
James Newton-King (JamesNK) merged 2 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19272Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19272" |
There was a problem hiding this comment.
Pull request overview
Preserves CLI status messages while suppressing interactive spinners during debug or console logging.
Changes:
- Centralizes spinner eligibility and nested-status guarding.
- Displays stable status updates in fallback modes.
- Expands unit and doctor end-to-end regression coverage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Aspire.Cli/Interaction/ConsoleInteractionService.cs |
Centralizes interactive-status selection. |
tests/Aspire.Cli.Tests/Interaction/ConsoleInteractionServiceTests.cs |
Tests fallback status behavior. |
tests/Aspire.Cli.Tests/Interaction/SpectreConsoleLoggerProviderTests.cs |
Verifies trace filtering. |
tests/Aspire.Cli.EndToEnd.Tests/DoctorCommandTests.cs |
Validates debug output without spinner glyphs. |
James Newton-King (JamesNK)
left a comment
There was a problem hiding this comment.
One blocking output regression found: console logging now duplicates status messages because the fallback both logs and renders them directly. Focused CLI unit tests pass, but the current combined-output assertions do not detect the duplication.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
tests/Aspire.Cli.Tests/Interaction/SpectreConsoleLoggerProviderTests.cs:36
- This expectation conflicts with the CLI contract:
RootCommandStrings.DebugLevelArgumentDescriptionadvertisesTraceas a console log level, andProgram.CreateLoggerFactoryconfigures theAspire.Clifilter to the requested level. BecauseSpectreConsoleLogger.IsEnabledcurrently rejectsTrace,--log-level tracesilently omits all trace messages; assertingfalselocks in that bug. Permit trace for Aspire CLI categories and expecttruehere.
Assert.False(aspireLogger.IsEnabled(LogLevel.Trace));
7848bbc to
b5005c3
Compare
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
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)
left a comment
There was a problem hiding this comment.
Approving this direction. We'll want to fix the double printing of status messages when console logging is enabled, where the status can be emitted through both the logger and the fallback display path.
fa20d28
into
microsoft:main
|
🔍 CI Failure Analysis: Transient Infrastructure Failure The CI build failed due to transient infrastructure issues. Failed jobs:
If a rerun was not already requested automatically, visit the workflow run page to rerun the failed jobs manually. |
Description
Console logging and debug mode should not use Spectre.Console's interactive status renderer because spinner frames can interleave with diagnostic logs. They should still show status updates as stable, subtle messages so users retain progress context.
This follow-up to #19214 and the review feedback on #19256:
ShouldShowInteractiveStatus, including the atomic nested-status guard.User-facing usage
Running doctor with console debug logging keeps readable status messages without interactive spinner frames:
Screenshots / Recordings
TODO: Run
aspire doctor --log-level debugin an interactive terminal and confirm status messages remain visible without spinner glyphs. Local archive creation was blocked by unrelated existing Dashboard package path-length errors (NU5123).Validation
ConsoleInteractionServiceTestsandSpectreConsoleLoggerProviderTests: 119 passed.Aspire.Cli.EndToEnd.Testsproject build passed.git diff --checkpassed.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?