424 references to CompletionState
Aspire.Hosting (94)
Ats\PipelineExports.cs (5)
190
private static
CompletionState
ParseCompletionState(string completionState)
196
"inprogress" or "in_progress" or "in-progress" =>
CompletionState
.InProgress,
197
"completed" =>
CompletionState
.Completed,
198
"completedwithwarning" or "completed_with_warning" or "completed-with-warning" =>
CompletionState
.CompletedWithWarning,
199
"completedwitherror" or "completed_with_error" or "completed-with-error" =>
CompletionState
.CompletedWithError,
Pipelines\IPipelineActivityReporter.cs (1)
44
Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default);
Pipelines\IReportingStep.cs (4)
58
Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default);
66
Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default);
Pipelines\IReportingTask.cs (4)
31
Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default);
39
Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default);
Pipelines\NullPipelineActivityReporter.cs (9)
27
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
62
public Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
67
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
90
public Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
95
public Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Pipelines\PipelineActivityReporter.cs (30)
32
private static string ToBackchannelCompletionState(
CompletionState
state) => state switch
34
CompletionState
.InProgress => CompletionStates.InProgress,
35
CompletionState
.Completed => CompletionStates.Completed,
36
CompletionState
.CompletedWithWarning => CompletionStates.CompletedWithWarning,
37
CompletionState
.CompletedWithError => CompletionStates.CompletedWithError,
41
private static PublishingActivityData CreateStepActivityData(ReportingStep step, string statusText,
CompletionState
completionState, bool enableMarkdown)
73
Data = CreateStepActivityData(step, step.Title,
CompletionState
.InProgress, enableMarkdown: false)
89
if (parentStep.CompletionState !=
CompletionState
.InProgress)
107
CompletionState = ToBackchannelCompletionState(
CompletionState
.InProgress),
117
public async Task CompleteStepAsync(ReportingStep step, string completionText,
CompletionState
completionState, bool enableMarkdown, CancellationToken cancellationToken)
122
if (step.CompletionState !=
CompletionState
.InProgress)
149
if (parentStep.CompletionState !=
CompletionState
.InProgress)
164
CompletionState = ToBackchannelCompletionState(
CompletionState
.InProgress),
182
if (parentStep.CompletionState !=
CompletionState
.InProgress)
195
CompletionState = ToBackchannelCompletionState(
CompletionState
.Completed),
206
public async Task CompleteTaskAsync(ReportingTask task,
CompletionState
completionState, string? completionMessage, bool enableMarkdown, CancellationToken cancellationToken)
214
if (task.CompletionState !=
CompletionState
.InProgress)
221
if (parentStep.CompletionState !=
CompletionState
.InProgress)
250
var
finalState = options?.CompletionState ?? CalculateOverallAggregatedState();
260
CompletionState
.Completed => "Pipeline completed successfully",
261
CompletionState
.CompletedWithWarning => "Pipeline completed with warnings",
262
CompletionState
.CompletedWithError => "Pipeline completed with errors",
279
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
291
private
CompletionState
CalculateOverallAggregatedState()
295
return
CompletionState
.Completed;
298
var
maxState =
CompletionState
.InProgress;
301
var
stepState = step.CompletionState;
362
CompletionState = ToBackchannelCompletionState(
CompletionState
.InProgress),
393
CompletionState = ToBackchannelCompletionState(
CompletionState
.InProgress),
Pipelines\PipelineStepHelpers.cs (4)
91
CompletionState
.Completed,
98
CompletionState
.CompletedWithError,
131
CompletionState
.Completed,
138
CompletionState
.CompletedWithError,
Pipelines\PublishCompletionOptions.cs (1)
20
public
CompletionState
? CompletionState { get; set; }
Pipelines\ReportingStep.cs (16)
49
public
CompletionState
CompletionState
55
private
CompletionState
_completionState =
CompletionState
.InProgress;
83
internal
CompletionState
CalculateAggregatedState()
87
return
CompletionState
.Completed;
90
var
maxState =
CompletionState
.InProgress;
163
public async Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
174
public async Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
197
if (CompletionState !=
CompletionState
.InProgress)
203
var
finalState = CalculateAggregatedState();
209
CompletionState
.Completed => $"{Title} completed successfully",
210
CompletionState
.CompletedWithWarning => $"{Title} completed with warnings",
211
CompletionState
.CompletedWithError => $"{Title} completed with errors",
Pipelines\ReportingTask.cs (7)
42
public
CompletionState
CompletionState { get; internal set; } =
CompletionState
.InProgress;
63
public async Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
69
public async Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
80
if (CompletionState !=
CompletionState
.InProgress)
Publishing\PipelineExecutor.cs (1)
90
await activityReporter.CompletePublishAsync(new PublishCompletionOptions { CompletionMessage = ex.Message, CompletionState =
CompletionState
.CompletedWithError }, stoppingToken).ConfigureAwait(false);
Publishing\PublishingExtensions.cs (12)
25
await step.CompleteAsync(completionText,
CompletionState
.Completed, cancellationToken).ConfigureAwait(false);
41
await step.CompleteAsync(message,
CompletionState
.Completed, cancellationToken).ConfigureAwait(false);
58
await step.CompleteAsync(completionText,
CompletionState
.CompletedWithWarning, cancellationToken).ConfigureAwait(false);
74
await step.CompleteAsync(message,
CompletionState
.CompletedWithWarning, cancellationToken).ConfigureAwait(false);
91
await step.CompleteAsync(completionText,
CompletionState
.CompletedWithError, cancellationToken).ConfigureAwait(false);
107
await step.CompleteAsync(errorMessage,
CompletionState
.CompletedWithError, cancellationToken).ConfigureAwait(false);
155
await task.CompleteAsync(message,
CompletionState
.Completed, cancellationToken).ConfigureAwait(false);
171
await task.CompleteAsync(message,
CompletionState
.Completed, cancellationToken).ConfigureAwait(false);
187
await task.CompleteAsync(message,
CompletionState
.CompletedWithWarning, cancellationToken).ConfigureAwait(false);
203
await task.CompleteAsync(message,
CompletionState
.CompletedWithWarning, cancellationToken).ConfigureAwait(false);
219
await task.CompleteAsync(errorMessage,
CompletionState
.CompletedWithError, cancellationToken).ConfigureAwait(false);
235
await task.CompleteAsync(errorMessage,
CompletionState
.CompletedWithError, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure (14)
AzureBicepResource.cs (3)
357
CompletionState
.Completed,
368
CompletionState
.Completed,
383
CompletionState
.CompletedWithError,
AzureEnvironmentResource.cs (9)
226
CompletionState
.CompletedWithError,
234
CompletionState
.Completed,
254
CompletionState
.Completed,
288
CompletionState
.Completed,
313
CompletionState
.Completed,
328
CompletionState
.Completed,
338
CompletionState
.Completed,
389
CompletionState
.Completed,
396
CompletionState
.CompletedWithError,
AzurePublishingContext.cs (2)
421
0 => ("No azure compute environments found in the model.",
CompletionState
.CompletedWithWarning),
422
_ => ($"Found {computeEnvironments.Count} compute environment(s) in the model.",
CompletionState
.Completed)
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppEnvironmentResource.cs (1)
173
CompletionState
.Completed,
Aspire.Hosting.Azure.AppService (4)
AzureAppServiceEnvironmentResource.cs (4)
251
CompletionState
.Completed,
262
CompletionState
.Completed,
303
CompletionState
.CompletedWithError,
312
CompletionState
.Completed,
Aspire.Hosting.Azure.ContainerRegistry (1)
AzureContainerRegistryHelpers.cs (1)
53
CompletionState
.Completed,
Aspire.Hosting.Azure.EntraId.Tests (14)
EntraIdProvisioningTests.cs (1)
1218
Assert.All(reporter.CompletedSteps, step => Assert.Equal(
CompletionState
.Completed, step.CompletionState));
tests\Shared\TestPipelineActivityReporter.cs (13)
44
public List<(string StepTitle, string CompletionText,
CompletionState
CompletionState)> CompletedSteps { get; } = [];
49
public List<(string TaskStatusText, string? CompletionMessage,
CompletionState
CompletionState)> CompletedTasks { get; } = [];
69
public Action<string, string,
CompletionState
>? OnStepCompleted { get; set; }
84
public
CompletionState
? ResultCompletionState { get; private set; }
145
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
191
public Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
248
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
270
public Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
298
public Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.Kubernetes.Tests (21)
AzureKubernetesInfrastructureTests.cs (8)
642
step => step is ("destroy-azure-azure-environment", _,
CompletionState
.Completed));
693
step => step is ("destroy-azure-azure-environment", _,
CompletionState
.Completed));
765
step => step is ("destroy-azure-azure-environment", _,
CompletionState
.Completed));
816
step => step is ("destroy-azure-azure-environment", _,
CompletionState
.Completed));
888
step => step is ("destroy-azure-azure-environment", _,
CompletionState
.Completed));
960
step => step is ("pipeline-execution", "Completed successfully",
CompletionState
.Completed));
1030
step => step is ("pipeline-execution", "Completed successfully",
CompletionState
.Completed));
1119
Assert.Equal(
CompletionState
.CompletedWithError, reporter.ResultCompletionState);
tests\Shared\TestPipelineActivityReporter.cs (13)
44
public List<(string StepTitle, string CompletionText,
CompletionState
CompletionState)> CompletedSteps { get; } = [];
49
public List<(string TaskStatusText, string? CompletionMessage,
CompletionState
CompletionState)> CompletedTasks { get; } = [];
69
public Action<string, string,
CompletionState
>? OnStepCompleted { get; set; }
84
public
CompletionState
? ResultCompletionState { get; private set; }
145
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
191
public Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
248
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
270
public Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
298
public Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.Sandboxes (8)
AzureSandboxContainerDeployment.cs (7)
312
await diskTask.CompleteAsync($"Created sandbox disk image {diskImageId}",
CompletionState
.Completed, context.CancellationToken).ConfigureAwait(false);
338
await createTask.CompleteAsync($"Created sandbox {sandboxId}",
CompletionState
.Completed, context.CancellationToken).ConfigureAwait(false);
351
await lifecycleTask.CompleteAsync("Lifecycle policy configured",
CompletionState
.Completed, context.CancellationToken).ConfigureAwait(false);
376
await exposeTask.CompleteAsync(new MarkdownString($"Public URL: [{endpointUrl}]({endpointUrl})"),
CompletionState
.Completed, context.CancellationToken).ConfigureAwait(false);
1333
CompletionState
.CompletedWithWarning,
1351
CompletionState
.Completed,
1466
await cleanupTask.CompleteAsync($"Deleted stale sandbox deployment {sectionName}",
CompletionState
.Completed, context.CancellationToken).ConfigureAwait(false);
AzureSandboxGroupResource.cs (1)
177
CompletionState
.Completed,
Aspire.Hosting.Azure.Tests (38)
AzureAppServiceTests.cs (3)
265
step.CompletionState ==
CompletionState
.Completed);
301
step.CompletionState ==
CompletionState
.CompletedWithError);
335
step.CompletionState ==
CompletionState
.Completed);
AzureContainerAppExpressEndpointTests.cs (1)
238
Assert.NotEqual(
CompletionState
.CompletedWithError, reporter.ResultCompletionState);
AzureDeployerTests.cs (21)
60
Assert.NotEqual(
CompletionState
.CompletedWithError, reporter.ResultCompletionState);
139
Assert.NotEqual(
CompletionState
.CompletedWithError, reporter.ResultCompletionState);
193
Assert.Contains(reporter.CompletedSteps, step => step.StepTitle == "pipeline-execution" && step.CompletionState ==
CompletionState
.Completed);
197
Assert.Equal(
CompletionState
.CompletedWithError, reporter.ResultCompletionState);
220
Assert.Equal(
CompletionState
.CompletedWithError, reporter.ResultCompletionState);
369
Assert.NotEqual(
CompletionState
.CompletedWithError, mockActivityReporter.ResultCompletionState);
424
Assert.NotEqual(
CompletionState
.CompletedWithError, mockActivityReporter.ResultCompletionState);
479
Assert.NotEqual(
CompletionState
.CompletedWithError, mockActivityReporter.ResultCompletionState);
539
Assert.NotEqual(
CompletionState
.CompletedWithError, mockActivityReporter.ResultCompletionState);
605
Assert.NotEqual(
CompletionState
.CompletedWithError, mockActivityReporter.ResultCompletionState);
673
Assert.NotEqual(
CompletionState
.CompletedWithError, mockActivityReporter.ResultCompletionState);
710
Assert.NotEqual(
CompletionState
.CompletedWithError, reporter.ResultCompletionState);
795
Assert.NotEqual(
CompletionState
.CompletedWithError, mockActivityReporter.ResultCompletionState);
879
Assert.NotEqual(
CompletionState
.CompletedWithError, mockActivityReporter.ResultCompletionState);
1142
Assert.NotEqual(
CompletionState
.CompletedWithError, mockActivityReporter.ResultCompletionState);
1204
Assert.NotEqual(
CompletionState
.CompletedWithError, mockActivityReporter.ResultCompletionState);
1414
Assert.NotEqual(
CompletionState
.CompletedWithError, mockActivityReporter.ResultCompletionState);
1696
.Where(s => s.CompletionState ==
CompletionState
.CompletedWithError)
1701
.Where(t => t.CompletionState ==
CompletionState
.CompletedWithError)
2335
Assert.Equal(
CompletionState
.CompletedWithError, loginStep.CompletionState);
2357
Assert.Equal(
CompletionState
.Completed, loginStep.CompletionState);
tests\Shared\TestPipelineActivityReporter.cs (13)
44
public List<(string StepTitle, string CompletionText,
CompletionState
CompletionState)> CompletedSteps { get; } = [];
49
public List<(string TaskStatusText, string? CompletionMessage,
CompletionState
CompletionState)> CompletedTasks { get; } = [];
69
public Action<string, string,
CompletionState
>? OnStepCompleted { get; set; }
84
public
CompletionState
? ResultCompletionState { get; private set; }
145
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
191
public Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
248
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
270
public Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
298
public Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Docker (6)
DockerComposeEnvironmentResource.cs (6)
151
CompletionState
.Completed,
180
CompletionState
.Completed,
460
CompletionState
.Completed,
465
await deployTask.CompleteAsync($"Compose deployment failed ({runtime.Name}): {ex.Message}",
CompletionState
.CompletedWithError, context.CancellationToken).ConfigureAwait(false);
498
CompletionState
.Completed,
503
await deployTask.CompleteAsync($"Compose shutdown failed ({runtime.Name}): {ex.Message}",
CompletionState
.CompletedWithError, context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Docker.Tests (13)
tests\Shared\TestPipelineActivityReporter.cs (13)
44
public List<(string StepTitle, string CompletionText,
CompletionState
CompletionState)> CompletedSteps { get; } = [];
49
public List<(string TaskStatusText, string? CompletionMessage,
CompletionState
CompletionState)> CompletedTasks { get; } = [];
69
public Action<string, string,
CompletionState
>? OnStepCompleted { get; set; }
84
public
CompletionState
? ResultCompletionState { get; private set; }
145
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
191
public Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
248
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
270
public Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
298
public Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Foundry.Tests (13)
tests\Shared\TestPipelineActivityReporter.cs (13)
44
public List<(string StepTitle, string CompletionText,
CompletionState
CompletionState)> CompletedSteps { get; } = [];
49
public List<(string TaskStatusText, string? CompletionMessage,
CompletionState
CompletionState)> CompletedTasks { get; } = [];
69
public Action<string, string,
CompletionState
>? OnStepCompleted { get; set; }
84
public
CompletionState
? ResultCompletionState { get; private set; }
145
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
191
public Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
248
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
270
public Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
298
public Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Go.Tests (13)
tests\Shared\TestPipelineActivityReporter.cs (13)
44
public List<(string StepTitle, string CompletionText,
CompletionState
CompletionState)> CompletedSteps { get; } = [];
49
public List<(string TaskStatusText, string? CompletionMessage,
CompletionState
CompletionState)> CompletedTasks { get; } = [];
69
public Action<string, string,
CompletionState
>? OnStepCompleted { get; set; }
84
public
CompletionState
? ResultCompletionState { get; private set; }
145
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
191
public Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
248
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
270
public Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
298
public Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Java.Tests (13)
tests\Shared\TestPipelineActivityReporter.cs (13)
44
public List<(string StepTitle, string CompletionText,
CompletionState
CompletionState)> CompletedSteps { get; } = [];
49
public List<(string TaskStatusText, string? CompletionMessage,
CompletionState
CompletionState)> CompletedTasks { get; } = [];
69
public Action<string, string,
CompletionState
>? OnStepCompleted { get; set; }
84
public
CompletionState
? ResultCompletionState { get; private set; }
145
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
191
public Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
248
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
270
public Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
298
public Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Kubernetes (7)
Deployment\HelmDeploymentEngine.cs (7)
208
CompletionState
.Completed,
270
CompletionState
.Completed,
277
CompletionState
.CompletedWithError,
494
CompletionState
.Completed,
502
CompletionState
.CompletedWithError,
639
CompletionState
.Completed,
647
CompletionState
.CompletedWithError,
Aspire.Hosting.Kubernetes.Tests (16)
KubernetesDeployTests.cs (1)
2043
step => step is ("pipeline-execution", "Completed successfully",
CompletionState
.Completed));
KubernetesPublisherTests.cs (2)
1303
Assert.Equal(
CompletionState
.CompletedWithError, reporter.ResultCompletionState);
1329
Assert.Equal(
CompletionState
.CompletedWithError, reporter.ResultCompletionState);
tests\Shared\TestPipelineActivityReporter.cs (13)
44
public List<(string StepTitle, string CompletionText,
CompletionState
CompletionState)> CompletedSteps { get; } = [];
49
public List<(string TaskStatusText, string? CompletionMessage,
CompletionState
CompletionState)> CompletedTasks { get; } = [];
69
public Action<string, string,
CompletionState
>? OnStepCompleted { get; set; }
84
public
CompletionState
? ResultCompletionState { get; private set; }
145
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
191
public Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
248
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
270
public Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
298
public Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Rust.Tests (15)
AddRustAppPublishTests.cs (2)
411
Assert.Equal(
CompletionState
.CompletedWithError, reporter.ResultCompletionState);
466
Assert.Equal(
CompletionState
.CompletedWithError, reporter.ResultCompletionState);
tests\Shared\TestPipelineActivityReporter.cs (13)
44
public List<(string StepTitle, string CompletionText,
CompletionState
CompletionState)> CompletedSteps { get; } = [];
49
public List<(string TaskStatusText, string? CompletionMessage,
CompletionState
CompletionState)> CompletedTasks { get; } = [];
69
public Action<string, string,
CompletionState
>? OnStepCompleted { get; set; }
84
public
CompletionState
? ResultCompletionState { get; private set; }
145
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
191
public Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
248
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
270
public Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
298
public Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Tests (111)
Pipelines\DistributedApplicationPipelineTests.cs (2)
931
Assert.Contains(reporter.CompletedSteps, step => step.StepTitle == "failing-step" && step.CompletionState ==
CompletionState
.CompletedWithError);
1301
Assert.Contains(reporter.CompletedSteps, step => step.StepTitle == "failing-step" && step.CompletionState ==
CompletionState
.CompletedWithError);
Pipelines\PipelineLoggerProviderTests.cs (3)
139
public Task CompleteAsync(string statusText,
CompletionState
completionState, CancellationToken cancellationToken = default)
144
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Publishing\PipelineActivityReporterTests.cs (88)
37
Assert.Equal(
CompletionState
.InProgress, stepInternal.CompletionState);
71
await step.CompleteAsync("Done",
CompletionState
.Completed, CancellationToken.None);
124
Assert.Equal(
CompletionState
.InProgress, taskInternal.CompletionState);
161
await step.CompleteAsync("Completed",
CompletionState
.Completed, CancellationToken.None);
185
await step.CompleteAsync(completionText, isError ?
CompletionState
.CompletedWithError :
CompletionState
.Completed, CancellationToken.None);
189
Assert.NotEqual(
CompletionState
.InProgress, stepInternal.CompletionState);
265
await step.CompleteAsync("Completed",
CompletionState
.Completed, CancellationToken.None);
295
Assert.Equal(
CompletionState
.Completed, taskInternal.CompletionState);
319
await step.CompleteAsync("Completed",
CompletionState
.Completed, CancellationToken.None);
330
[InlineData(
CompletionState
.Completed, "Pipeline completed successfully", false)]
331
[InlineData(
CompletionState
.CompletedWithError, "Pipeline completed with errors", true)]
332
[InlineData(
CompletionState
.CompletedWithWarning, "Pipeline completed with warnings", false)]
333
public async Task CompletePublishAsync_EmitsCorrectActivity(
CompletionState
completionState, string expectedStatusText, bool expectedIsError)
349
Assert.Equal(completionState ==
CompletionState
.CompletedWithWarning, activity.Data.IsWarning);
360
await reporter.CompletePublishAsync(new PublishCompletionOptions { CompletionMessage = expectedStatusText, CompletionState =
CompletionState
.CompletedWithError }, CancellationToken.None);
385
await step1.CompleteAsync("Step 1 completed",
CompletionState
.Completed, CancellationToken.None);
389
await step2.CompleteAsync("Step 2 completed with warning",
CompletionState
.CompletedWithWarning, CancellationToken.None);
393
await step3.CompleteAsync("Step 3 failed",
CompletionState
.CompletedWithError, CancellationToken.None);
449
Assert.Equal(
CompletionState
.Completed, taskInternal.CompletionState);
462
await task.CompleteAsync((string?)null,
CompletionState
.Completed, cancellationToken: CancellationToken.None);
468
await task.CompleteAsync("Error",
CompletionState
.CompletedWithError, cancellationToken: CancellationToken.None);
474
Assert.Equal(
CompletionState
.Completed, taskInternal.CompletionState); // Original state is retained
498
Assert.Equal(
CompletionState
.Completed, stepInternal.CompletionState);
511
await step.CompleteAsync("Complete",
CompletionState
.Completed, cancellationToken: CancellationToken.None);
517
await step.CompleteAsync("Error",
CompletionState
.CompletedWithError, cancellationToken: CancellationToken.None);
523
Assert.Equal(
CompletionState
.Completed, stepInternal.CompletionState); // Original state is retained
540
await step.CompleteAsync("Step completed",
CompletionState
.Completed, CancellationToken.None);
551
await task.CompleteAsync("Error",
CompletionState
.CompletedWithError, cancellationToken: CancellationToken.None); // Should also not throw (noop)
758
var
aggregatedState = stepInternal.CalculateAggregatedState();
761
Assert.Equal(
CompletionState
.Completed, aggregatedState);
779
Assert.Equal(
CompletionState
.Completed, stepInternal.CompletionState);
813
Assert.Equal(
CompletionState
.Completed, stepInternal.CompletionState);
834
await step.CompleteAsync("Step completed manually",
CompletionState
.Completed, CancellationToken.None);
845
Assert.Equal(
CompletionState
.Completed, stepInternal.CompletionState);
869
Assert.Equal(
CompletionState
.CompletedWithWarning, taskInternal.CompletionState);
904
Assert.Equal(
CompletionState
.CompletedWithError, taskInternal.CompletionState);
920
[InlineData(
CompletionState
.Completed, "Pipeline completed successfully", false)]
921
[InlineData(
CompletionState
.CompletedWithError, "Pipeline completed with errors", true)]
922
[InlineData(
CompletionState
.CompletedWithWarning, "Pipeline completed with warnings", false)]
923
public async Task CompletePublishAsync_WithDeployFlag_EmitsCorrectActivity(
CompletionState
completionState, string expectedStatusText, bool expectedIsError)
939
Assert.Equal(completionState ==
CompletionState
.CompletedWithWarning, activity.Data.IsWarning);
950
await reporter.CompletePublishAsync(new PublishCompletionOptions { CompletionMessage = expectedStatusText, CompletionState =
CompletionState
.CompletedWithError }, CancellationToken.None);
976
await reporter.CompletePublishAsync(new PublishCompletionOptions { CompletionState =
CompletionState
.Completed, PipelineSummary = pipelineSummary }, CancellationToken.None);
1003
await reporter.CompletePublishAsync(new PublishCompletionOptions { CompletionState =
CompletionState
.Completed }, CancellationToken.None);
1100
await step.CompleteAsync("Completed",
CompletionState
.Completed, CancellationToken.None);
1190
await task.CompleteAsync(new MarkdownString("Deployed to **Azure**"),
CompletionState
.Completed, CancellationToken.None);
1209
await step.CompleteAsync(new MarkdownString("Step **completed** successfully"),
CompletionState
.Completed, CancellationToken.None);
1229
await task.CompleteAsync("Warning message",
CompletionState
.CompletedWithWarning, CancellationToken.None);
1235
await task.CompleteAsync("Different warning message",
CompletionState
.CompletedWithWarning, CancellationToken.None);
1241
Assert.Equal(
CompletionState
.CompletedWithWarning, taskInternal.CompletionState);
1254
await task.CompleteAsync("Error message",
CompletionState
.CompletedWithError, CancellationToken.None);
1260
await task.CompleteAsync("Different error message",
CompletionState
.CompletedWithError, CancellationToken.None);
1266
Assert.Equal(
CompletionState
.CompletedWithError, taskInternal.CompletionState);
1278
await step.CompleteAsync("Warning",
CompletionState
.CompletedWithWarning, CancellationToken.None);
1284
await step.CompleteAsync("Different warning",
CompletionState
.CompletedWithWarning, CancellationToken.None);
1290
Assert.Equal(
CompletionState
.CompletedWithWarning, stepInternal.CompletionState);
1302
await step.CompleteAsync("Error",
CompletionState
.CompletedWithError, CancellationToken.None);
1308
await step.CompleteAsync("Different error",
CompletionState
.CompletedWithError, CancellationToken.None);
1314
Assert.Equal(
CompletionState
.CompletedWithError, stepInternal.CompletionState);
1318
[InlineData(
CompletionState
.Completed,
CompletionState
.CompletedWithWarning)]
1319
[InlineData(
CompletionState
.Completed,
CompletionState
.CompletedWithError)]
1320
[InlineData(
CompletionState
.CompletedWithWarning,
CompletionState
.Completed)]
1321
[InlineData(
CompletionState
.CompletedWithWarning,
CompletionState
.CompletedWithError)]
1322
[InlineData(
CompletionState
.CompletedWithError,
CompletionState
.Completed)]
1323
[InlineData(
CompletionState
.CompletedWithError,
CompletionState
.CompletedWithWarning)]
1324
public async Task CompleteTaskAsync_IdempotentWhenTransitioningBetweenTerminalStates(
CompletionState
firstState,
CompletionState
secondState)
1349
[InlineData(
CompletionState
.Completed,
CompletionState
.CompletedWithWarning)]
1350
[InlineData(
CompletionState
.Completed,
CompletionState
.CompletedWithError)]
1351
[InlineData(
CompletionState
.CompletedWithWarning,
CompletionState
.Completed)]
1352
[InlineData(
CompletionState
.CompletedWithWarning,
CompletionState
.CompletedWithError)]
1353
[InlineData(
CompletionState
.CompletedWithError,
CompletionState
.Completed)]
1354
[InlineData(
CompletionState
.CompletedWithError,
CompletionState
.CompletedWithWarning)]
1355
public async Task CompleteStepAsync_IdempotentWhenTransitioningBetweenTerminalStates(
CompletionState
firstState,
CompletionState
secondState)
Publishing\PublishingExtensionsTests.cs (5)
32
Assert.Equal(
CompletionState
.InProgress, taskInternal.CompletionState);
49
Assert.NotEqual(
CompletionState
.InProgress, stepInternal.CompletionState);
86
Assert.Equal(
CompletionState
.Completed, taskInternal.CompletionState);
104
Assert.Equal(
CompletionState
.CompletedWithWarning, taskInternal.CompletionState);
121
Assert.Equal(
CompletionState
.CompletedWithError, taskInternal.CompletionState);
tests\Shared\TestPipelineActivityReporter.cs (13)
44
public List<(string StepTitle, string CompletionText,
CompletionState
CompletionState)> CompletedSteps { get; } = [];
49
public List<(string TaskStatusText, string? CompletionMessage,
CompletionState
CompletionState)> CompletedTasks { get; } = [];
69
public Action<string, string,
CompletionState
>? OnStepCompleted { get; set; }
84
public
CompletionState
? ResultCompletionState { get; private set; }
145
public Task CompletePublishAsync(string? completionMessage = null,
CompletionState
? completionState = null, CancellationToken cancellationToken = default)
191
public Task CompleteAsync(string completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
248
public Task CompleteAsync(MarkdownString completionText,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
270
public Task CompleteAsync(string? completionMessage = null,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
298
public Task CompleteAsync(MarkdownString completionMessage,
CompletionState
completionState =
CompletionState
.Completed, CancellationToken cancellationToken = default)
Pipelines.AppHost (12)
AppHost.cs (12)
86
CompletionState
.CompletedWithWarning,
101
CompletionState
.CompletedWithWarning,
121
CompletionState
.CompletedWithWarning,
136
CompletionState
.CompletedWithWarning,
156
CompletionState
.CompletedWithWarning,
171
CompletionState
.CompletedWithWarning,
194
CompletionState
.CompletedWithWarning,
206
CompletionState
.CompletedWithWarning,
213
CompletionState
.Completed,
220
CompletionState
.CompletedWithWarning,
272
CompletionState
.CompletedWithWarning,
317
CompletionState
.Completed,
Pipelines.Library (7)
DistributedApplicationPipelineExtensions.cs (7)
94
CompletionState
.CompletedWithError,
106
CompletionState
.CompletedWithError,
113
CompletionState
.Completed,
125
CompletionState
.Completed,
143
CompletionState
.CompletedWithError,
169
CompletionState
.CompletedWithError,
176
CompletionState
.Completed,
SimplePipelines.AppHost (3)
AppHost.cs (3)
18
CompletionState
.Completed,
36
CompletionState
.Completed,
54
CompletionState
.Completed,