Fix mardown rendering during failed deployment#15757
Open
eerhardt wants to merge 2 commits intomicrosoft:mainfrom
Open
Fix mardown rendering during failed deployment#15757eerhardt wants to merge 2 commits intomicrosoft:mainfrom
eerhardt wants to merge 2 commits intomicrosoft:mainfrom
Conversation
When aspire deploy fails to provision in Azure, the message says ``` Failed to provision [bold]storage-roles[/]: Deployment failed ``` The `[bold]` is getting escaped instead of processed by Spectre. The fix is to not EscapeMarkup inside the ConsoleActivityLogger because these strings have already been escaped if necessary.
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15757Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15757" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Spectre.Console markup rendering in the CLI deployment summary when a deployment fails (e.g., ensuring [bold]...[/] markup produced from markdown is rendered instead of being escaped).
Changes:
- Stop escaping Spectre markup in
ConsoleActivityLogger.WriteSummary()for stepDisplayNameandFailureReason. - Update/add tests to validate both pre-escaped bracket rendering (
[[/]]) and Spectre markup rendering ([bold]...[/]) in failure reasons.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Aspire.Cli/Utils/ConsoleActivityLogger.cs |
Avoids EscapeMarkup() so pre-processed Spectre-safe strings (including converted markdown) render correctly in the summary. |
tests/Aspire.Cli.Tests/Utils/ConsoleActivityLoggerTests.cs |
Adjusts failure-reason expectations and adds coverage for Spectre markup in failure reasons. |
davidfowl
approved these changes
Apr 1, 2026
JamesNK
approved these changes
Apr 2, 2026
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
When aspire deploy fails to provision in Azure, the message says
The
[bold]is getting escaped instead of processed by Spectre.The fix is to not EscapeMarkup inside the ConsoleActivityLogger because these strings have already been escaped if necessary.