Render publish summary hierarchy and timeline#15530
Render publish summary hierarchy and timeline#15530sebastienros wants to merge 4 commits intomicrosoft:mainfrom
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15530Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15530" |
There was a problem hiding this comment.
Pull request overview
This PR enhances aspire do publish step summaries by rendering steps in a hierarchical (parent/child) order and adding a compact timeline ruler + per-step bars to visualize when each step starts/finishes. It does so by emitting hierarchy metadata from the hosting pipeline and consuming it in the CLI summary renderer.
Changes:
- Add
ParentStepId/HierarchyLevelmetadata to publishing step activities and propagate it from pipeline execution. - Update CLI summary rendering to order steps hierarchically and display a timeline scale with per-step bars.
- Add/extend unit tests for hierarchy metadata emission and timeline/tree rendering.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Hosting.Tests/Publishing/PipelineActivityReporterTests.cs | Adds coverage ensuring hierarchy metadata is emitted on step create/complete activities. |
| tests/Aspire.Cli.Tests/Utils/ConsoleActivityLoggerTests.cs | Adds assertions for hierarchical ordering and timeline ruler/bar output in summaries. |
| src/Aspire.Hosting/Pipelines/ReportingStep.cs | Stores parent step id + hierarchy level on the reporting step instance. |
| src/Aspire.Hosting/Pipelines/PipelineActivityReporter.cs | Emits hierarchy metadata in step activities via a shared activity-data builder. |
| src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs | Computes display hierarchy from DAG dependencies and supplies parent/level metadata when creating reporting steps. |
| src/Aspire.Hosting/Backchannel/BackchannelDataTypes.cs | Extends backchannel activity payload with ParentStepId and HierarchyLevel. |
| src/Aspire.Cli/Utils/ConsoleActivityLogger.cs | Implements hierarchical ordering + timeline ruler/bars in the “Steps Summary” output. |
| src/Aspire.Cli/Commands/PipelineCommandBase.cs | Captures hierarchy metadata from activities and populates duration records with offsets for timeline rendering. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
adamint
left a comment
There was a problem hiding this comment.
I like it, works well with multiple hierarchy levels too
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
How deeply can things be nested? If something is nested 10 levels deep, what is displayed? It seems like text would be completely out of view because of indenting. |
| var timelineLabelPrefix = $" {new string(' ', durationWidth)} {"Step timeline:".PadRight(nameWidth)} "; | ||
|
|
||
| _console.WriteLine(); | ||
| _console.MarkupLine("Steps Summary:"); |
| { | ||
| var orderedRecords = OrderStepDurationsHierarchically(records); | ||
| var durationWidth = Math.Max(10, orderedRecords.Max(r => DurationFormatter.FormatDuration(r.Duration, CultureInfo.InvariantCulture, DecimalDurationDisplay.Fixed).Length)); | ||
| var nameWidth = Math.Max("Step timeline:".Length, orderedRecords.Max(r => GetIndentedDisplayName(r).Length)); |
|
|
||
| private static string BuildTimelineLabels(TimeSpan totalTimeline, int width) | ||
| { | ||
| var startText = "0s"; |
|
|
||
| if (startIndex == endIndex) | ||
| { | ||
| chars[startIndex] = '●'; |
There was a problem hiding this comment.
Is this for very small duration? What does it look like?
Maybe add some more comments to these methods.
| /// <summary> | ||
| /// Gets the identifier of the parent step used for hierarchical step summaries. | ||
| /// </summary> | ||
| public string? ParentStepId { get; init; } | ||
|
|
||
| /// <summary> | ||
| /// Gets the hierarchical level of the step used for display purposes. | ||
| /// </summary> | ||
| public int? HierarchyLevel { get; init; } |
There was a problem hiding this comment.
What happens if a new CLI is run against an old app host that doesn't return this data?
|
In the dashboard I found it useful to have a stress project that would generate extreme results that I could use to test the UI. I think you need something like that to test this timeline. I added an internal Use your imagination and try hard to break the UI with extreme situations. That's the only way to create something that consistently works for everyone. |




Description
Organizes the
aspire do publishstep summary hierarchically instead of sorting steps by duration alone.It also adds a compact Unicode timeline ruler and per-step bars so the summary shows when each step starts and finishes while keeping the same number of step lines.
To support the display, the pipeline now includes display-parent and level metadata for publish steps, and the CLI uses that metadata when rendering the summary.
Examples:
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: