Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions src/Aspire.Cli/Commands/PipelineCommandBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,9 @@ public async Task<bool> ProcessAndDisplayPublishingActivitiesAsync(IAsyncEnumera
Title = title,
Number = stepCounter++,
StartTime = DateTime.UtcNow,
CompletionState = activity.Data.CompletionState
CompletionState = activity.Data.CompletionState,
ParentStepId = activity.Data.ParentStepId,
HierarchyLevel = activity.Data.HierarchyLevel ?? 0
};

steps[activity.Data.Id] = stepInfo;
Expand All @@ -517,6 +519,8 @@ public async Task<bool> ProcessAndDisplayPublishingActivitiesAsync(IAsyncEnumera
}
else if (IsCompletionStateComplete(activity.Data.CompletionState))
{
stepInfo.ParentStepId ??= activity.Data.ParentStepId;
stepInfo.HierarchyLevel = activity.Data.HierarchyLevel ?? stepInfo.HierarchyLevel;
stepInfo.CompletionState = activity.Data.CompletionState;
stepInfo.CompletionText = ConvertTextWithMarkdownFlag(activity.Data.StatusText, activity.Data);
stepInfo.EndTime = DateTime.UtcNow;
Expand Down Expand Up @@ -670,8 +674,11 @@ public async Task<bool> ProcessAndDisplayPublishingActivitiesAsync(IAsyncEnumera
}
}

// Build duration breakdown (sorted by duration desc)
// Build duration breakdown, ordered by step sequence
var now = DateTime.UtcNow;
var earliestStartTime = steps.Count > 0
? steps.Values.Min(s => s.StartTime)
: now;
var durationRecords = steps.Values.Select(s =>
{
var end = s.EndTime ?? now;
Expand All @@ -687,9 +694,14 @@ var cs when IsCompletionStateWarning(cs) => ConsoleActivityLogger.ActivityState.
s.Title,
state,
end - s.StartTime,
s.FailureReason);
s.FailureReason,
s.ParentStepId,
s.HierarchyLevel,
s.Number,
s.StartTime - earliestStartTime,
end - earliestStartTime);
})
.OrderByDescending(r => r.Duration)
.OrderBy(r => r.Sequence)
.ToList();
logger.SetStepDurations(durationRecords);

Expand Down Expand Up @@ -901,6 +913,8 @@ private class StepInfo
public string Id { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public int Number { get; set; }
public string? ParentStepId { get; set; }
public int HierarchyLevel { get; set; }
public DateTime StartTime { get; set; }
public DateTime? EndTime { get; set; }
public string CompletionState { get; set; } = CompletionStates.InProgress;
Expand Down
12 changes: 12 additions & 0 deletions src/Aspire.Cli/Resources/SharedCommandStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/Aspire.Cli/Resources/SharedCommandStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,10 @@
<data name="PipelineEnvironmentOptionDescription" xml:space="preserve">
<value>The environment to use for the operation. The default is 'Production'.</value>
</data>
<data name="PipelineStepTimelineLabel" xml:space="preserve">
<value>Step timeline:</value>
</data>
<data name="PipelineStepsSummaryTitle" xml:space="preserve">
<value>Steps Summary:</value>
</data>
</root>
10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.pt-BR.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.ru.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.tr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.zh-Hans.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Aspire.Cli/Resources/xlf/SharedCommandStrings.zh-Hant.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading