Add Markdown support to pipeline logging and summaries#14957
Open
eerhardt wants to merge 9 commits intodotnet:release/13.2from
Open
Add Markdown support to pipeline logging and summaries#14957eerhardt wants to merge 9 commits intodotnet:release/13.2from
eerhardt wants to merge 9 commits intodotnet:release/13.2from
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14957Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14957" |
JamesNK
reviewed
Mar 6, 2026
Introduce MarkdownString and PipelineSummaryItem types to enable explicit Markdown formatting in pipeline logs and summaries. Update IReportingStep, IReportingTask, and related APIs with overloads and extensions for MarkdownString, allowing richer CLI output (e.g., clickable links, bold text) while preserving plain-text compatibility. Refactor summary storage and backchannel data to track Markdown formatting per item. Update ConsoleActivityLogger and tests to render Markdown appropriately. All changes are backward compatible for existing plain string usage.
Add ArgumentNullException.ThrowIfNull guards for all MarkdownString parameters in interface default implementations (IReportingStep, IReportingTask) and concrete overrides (ReportingStep, ReportingTask) to prevent NullReferenceException when callers pass null at runtime. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Since IReportingStep is experimental, remove default interface method bodies and make all new methods regular abstract interface members. Update test fakes (FakeReportingStep, TestReportingStep) to implement the new required methods. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Suppress CP0006 breaking change diagnostics for the 4 new abstract interface members on IReportingStep (CreateTaskAsync, Log x2, CompleteAsync with MarkdownString). These are intentional breaking changes to an experimental API (ASPIREPIPELINES001). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ngStep Add test coverage for EnableMarkdown flag propagation through: - CreateTaskAsync(MarkdownString) -> EnableMarkdown = true - UpdateAsync(MarkdownString) -> EnableMarkdown = true - CompleteAsync(MarkdownString) on task -> EnableMarkdown = true - CompleteAsync(MarkdownString) on step -> EnableMarkdown = true Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove default interface method bodies from IReportingTask for UpdateAsync(MarkdownString) and CompleteAsync(MarkdownString). Update TestReportingTask to implement the new required methods. Remove Azure-specific references from MarkdownString XML doc examples. Regenerate API compat suppressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
c100624 to
38f14ed
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces explicit Markdown support for pipeline logging and pipeline summaries by adding MarkdownString / PipelineSummaryItem types and threading a per-item/per-message “enable markdown” flag through the hosting backchannel into the CLI renderer.
Changes:
- Add new pipeline-facing types (
MarkdownString,PipelineSummaryItem) and update reporting/task/step APIs to accept them. - Refactor pipeline summary transport/storage from
KeyValuePair<string,string>to typed items that carry Markdown metadata. - Update CLI rendering and unit tests to render Markdown-enabled items/messages differently from plain text.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Shared/TestPipelineActivityReporter.cs | Updates test reporter to accept new Markdown overloads and summary item type. |
| tests/Aspire.Hosting.Tests/Publishing/PipelineActivityReporterTests.cs | Adjusts tests for overload ambiguity (null) and adds Markdown-specific coverage. |
| tests/Aspire.Hosting.Tests/Pipelines/PipelineSummaryTests.cs | Updates summary tests for PipelineSummaryItem and Markdown flag behavior. |
| tests/Aspire.Hosting.Tests/Pipelines/PipelineLoggerProviderTests.cs | Updates fake step logging APIs and suppresses obsolete usage where needed. |
| tests/Aspire.Cli.Tests/Utils/ConsoleActivityLoggerTests.cs | Updates CLI summary tests to use backchannel summary item type + Markdown flags. |
| src/Aspire.Hosting/Publishing/PublishingExtensions.cs | Adds Markdown overloads for Succeed/Warn/Fail/UpdateStatus helper extensions. |
| src/Aspire.Hosting/Pipelines/ReportingTask.cs | Plumbs enableMarkdown through task update/complete calls via new overloads. |
| src/Aspire.Hosting/Pipelines/ReportingStep.cs | Adds Markdown overloads for task creation/logging/completion; routes enableMarkdown to reporter. |
| src/Aspire.Hosting/Pipelines/PublishCompletionOptions.cs | Changes pipeline summary option to typed items carrying Markdown flag. |
| src/Aspire.Hosting/Pipelines/PipelineSummaryItem.cs | New public type representing a summary entry with Markdown metadata. |
| src/Aspire.Hosting/Pipelines/PipelineSummary.cs | Stores typed items and adds Add(key, MarkdownString) overload; updates docs. |
| src/Aspire.Hosting/Pipelines/PipelineLoggerProvider.cs | Uses new plain-text logging overload. |
| src/Aspire.Hosting/Pipelines/PipelineActivityReporter.cs | Threads EnableMarkdown through step/task/log activities and maps summary items to backchannel items. |
| src/Aspire.Hosting/Pipelines/NullPipelineActivityReporter.cs | Updates null reporter to implement new Markdown overloads. |
| src/Aspire.Hosting/Pipelines/MarkdownString.cs | New public wrapper type to explicitly mark strings as Markdown-formatted. |
| src/Aspire.Hosting/Pipelines/IReportingTask.cs | Adds Markdown overloads for task update/complete. |
| src/Aspire.Hosting/Pipelines/IReportingStep.cs | Adds Markdown overloads for task creation/logging/completion; obsoletes the old boolean-flag log API. |
| src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs | Updates diagnostics logging to use new plain-text overload. |
| src/Aspire.Hosting/CompatibilitySuppressions.xml | Adds API compatibility suppressions for newly added interface members. |
| src/Aspire.Hosting/Backchannel/BackchannelDataTypes.cs | Updates publishing activity data to carry typed pipeline summary items with Markdown metadata. |
| src/Aspire.Hosting.Docker/DockerComposeServiceResource.cs | Switches Markdown logging to MarkdownString overloads. |
| src/Aspire.Hosting.Azure/AzureEnvironmentResource.cs | Adds Markdown-aware summary entry (portal link) via MarkdownString. |
| src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebSiteResource.cs | Switches success logging to MarkdownString overload. |
| src/Aspire.Hosting.Azure.AppService/AzureAppServiceEnvironmentResource.cs | Updates error logging to use the new plain-text overload. |
| src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppResource.cs | Switches success logging to MarkdownString overloads. |
| src/Aspire.Cli/Utils/ConsoleActivityLogger.cs | Renders summary items differently depending on Markdown flag and color/interactive mode. |
| src/Aspire.Cli/Backchannel/BackchannelJsonSerializerContext.cs | Removes old List<KeyValuePair<string,string>> serialization entry (needs updating for new type). |
This was referenced Mar 7, 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
Introduce MarkdownString and PipelineSummaryItem types to enable explicit Markdown formatting in pipeline logs and summaries. Update IReportingStep, IReportingTask, and related APIs with overloads and extensions for MarkdownString, allowing richer CLI output (e.g., clickable links, bold text) while preserving plain-text compatibility. Refactor summary storage and backchannel data to track Markdown formatting per item. Update ConsoleActivityLogger and tests to render Markdown appropriately. All changes are backward compatible for existing plain string usage.
Checklist
<remarks />and<code />elements on your triple slash comments?