Skip to content

Fix mardown rendering during failed deployment#15757

Open
eerhardt wants to merge 2 commits intomicrosoft:mainfrom
eerhardt:FixMarkdown
Open

Fix mardown rendering during failed deployment#15757
eerhardt wants to merge 2 commits intomicrosoft:mainfrom
eerhardt:FixMarkdown

Conversation

@eerhardt
Copy link
Copy Markdown
Member

@eerhardt eerhardt commented Apr 1, 2026

Description

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.

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.
Copilot AI review requested due to automatic review settings April 1, 2026 16:57
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15757

Or

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

Copy link
Copy Markdown
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 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 step DisplayName and FailureReason.
  • 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.

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.

4 participants