Skip to content

Render publish summary hierarchy and timeline - #15530

Merged
Sébastien Ros (sebastienros) merged 12 commits into
microsoft:mainfrom
sebastienros:sebros/publish-steps-hierarchy
Apr 2, 2026
Merged

Sébastien Ros (sebastienros) merged 12 commits into
microsoft:mainfrom
sebastienros:sebros/publish-steps-hierarchy

Conversation

@sebastienros

@sebastienros Sébastien Ros (sebastienros) commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

Organizes the aspire do publish step 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:

image image

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@github-actions

github-actions Bot commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

🚀 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 -- 15530

Or

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 / HierarchyLevel metadata 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.

@adamint Adam Ratzman (adamint) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it, works well with multiple hierarchy levels too

@JamesNK

Copy link
Copy Markdown
Member

Nice.

I noticed the ticks at the top of the summary aren't consistently placed:
image

@JamesNK

Copy link
Copy Markdown
Member

What happens with long step names when there isn't enough room:
image

@JamesNK

Copy link
Copy Markdown
Member

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.

@JamesNK

James Newton-King (JamesNK) commented Mar 24, 2026 •

Copy link
Copy Markdown
Member

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 aspire render command for testing rendering various things. I think you could add an option to render this timeline with static data for various scenarios: deeply nested steps, very long text, text containing markup, mixing in steps without parents, very long and very short durations, etc.

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.

@davidfowl

Copy link
Copy Markdown
Collaborator

I was going to suggest also running it in a github actions pipeline to see how it renders.

@JamesNK

Copy link
Copy Markdown
Member

I added an internal aspire render command for testing rendering various things. I think you could add an option to render this timeline with static data for various scenarios: deeply nested steps, very long text, text containing markup, mixing in steps without parents, very long and very short durations, etc.

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.

I'd really like this so it would be easy for me to see output and then easily modify the static result that's passed to the render method to see if I can break it.

@sebastienros

Copy link
Copy Markdown
Contributor Author

James Newton-King (@JamesNK) I'll take the time then, I am fine taking this PR slow until it's better, I need to switch focus on more important things.

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@sebastienros

Sébastien Ros (sebastienros) commented Apr 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Captured render output from the new aspire render --scenario helper.

Publish summary render preview

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found: 1 potential bug (empty-list crash in WriteStepDurationsSummary), 1 design concern (concrete type-check coupling in DistributedApplicationPipeline).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 suggested additions to stress-test scenarios in RenderCommand.cs: deeper nesting with long names, and a zero-duration edge case.

@JamesNK

James Newton-King (JamesNK) commented Apr 2, 2026 •

Copy link
Copy Markdown
Member

I tested locally. I like that the waterflow chart disappears to stop step names wrapping.

Warnings don't look good on my machine:
image

I think that's an existing issue. I'll come back to this area once your done and see what we can do about making icons consistently look good.

I added a zero duration event and its duration is displayed as micro-seconds:
image

It's technically correct: this is the smallest duration and micro-seconds is as low as the units go, but it isn't a good experience. For a zero duration I think it would be best to use the timeline starting unit. 0s in this case.

@sebastienros

Copy link
Copy Markdown
Contributor Author

Reply to review 4048361212: Accepted. I added an early return in WriteStepDurationsSummary, and I moved hierarchy metadata onto IPipelineActivityReporter.CreateStepAsync(...) so the pipeline no longer special-cases PipelineActivityReporter. PipelineActivityReporter now resolves parent step identifiers internally, and the new flow is covered by focused tests.

@sebastienros

Copy link
Copy Markdown
Contributor Author

Reply to review 4048396252: Accepted. I expanded the render stress data with an additional deeply nested long-name step and a zero-duration event, and I extended the focused CLI coverage for the zero-duration scenario.

@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@sebastienros
Sébastien Ros (sebastienros) merged commit eb12689 into microsoft:main Apr 2, 2026
779 of 785 checks passed
@joperezr Jose Perez Rodriguez (joperezr) added this to the 13.3 milestone Apr 14, 2026
@github-actions github-actions Bot mentioned this pull request Apr 25, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

No documentation update is required for this PR.

The changes improve the visual rendering of the aspire publish step summary (hierarchical layout + Unicode timeline bars) but don't introduce any new commands, CLI options, configuration settings, or public APIs. This is an internal UX enhancement to CLI output with no impact on documented behavior.

Generated by PR Documentation Check · ● 180.6K · ◷

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants