379 references to CompletionState
Aspire.Hosting (94)
Ats\PipelineExports.cs (5)
192private static CompletionState ParseCompletionState(string completionState) 198"inprogress" or "in_progress" or "in-progress" => CompletionState.InProgress, 199"completed" => CompletionState.Completed, 200"completedwithwarning" or "completed_with_warning" or "completed-with-warning" => CompletionState.CompletedWithWarning, 201"completedwitherror" or "completed_with_error" or "completed-with-error" => CompletionState.CompletedWithError,
Pipelines\IPipelineActivityReporter.cs (1)
47Task CompletePublishAsync(string? completionMessage = null, CompletionState? completionState = null, CancellationToken cancellationToken = default);
Pipelines\IReportingStep.cs (4)
60Task CompleteAsync(string completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default); 68Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default);
Pipelines\IReportingTask.cs (4)
34Task CompleteAsync(string? completionMessage = null, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default); 42Task CompleteAsync(MarkdownString completionMessage, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default);
Pipelines\NullPipelineActivityReporter.cs (9)
31public Task CompletePublishAsync(string? completionMessage = null, CompletionState? completionState = null, CancellationToken cancellationToken = default) 67public Task CompleteAsync(string completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 72public Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 96public Task CompleteAsync(string? completionMessage = null, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 101public Task CompleteAsync(MarkdownString completionMessage, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default)
Pipelines\PipelineActivityReporter.cs (30)
34private static string ToBackchannelCompletionState(CompletionState state) => state switch 36CompletionState.InProgress => CompletionStates.InProgress, 37CompletionState.Completed => CompletionStates.Completed, 38CompletionState.CompletedWithWarning => CompletionStates.CompletedWithWarning, 39CompletionState.CompletedWithError => CompletionStates.CompletedWithError, 43private static PublishingActivityData CreateStepActivityData(ReportingStep step, string statusText, CompletionState completionState, bool enableMarkdown) 75Data = CreateStepActivityData(step, step.Title, CompletionState.InProgress, enableMarkdown: false) 91if (parentStep.CompletionState != CompletionState.InProgress) 109CompletionState = ToBackchannelCompletionState(CompletionState.InProgress), 119public async Task CompleteStepAsync(ReportingStep step, string completionText, CompletionState completionState, bool enableMarkdown, CancellationToken cancellationToken) 124if (step.CompletionState != CompletionState.InProgress) 151if (parentStep.CompletionState != CompletionState.InProgress) 166CompletionState = ToBackchannelCompletionState(CompletionState.InProgress), 184if (parentStep.CompletionState != CompletionState.InProgress) 197CompletionState = ToBackchannelCompletionState(CompletionState.Completed), 208public async Task CompleteTaskAsync(ReportingTask task, CompletionState completionState, string? completionMessage, bool enableMarkdown, CancellationToken cancellationToken) 216if (task.CompletionState != CompletionState.InProgress) 223if (parentStep.CompletionState != CompletionState.InProgress) 252var finalState = options?.CompletionState ?? CalculateOverallAggregatedState(); 262CompletionState.Completed => "Pipeline completed successfully", 263CompletionState.CompletedWithWarning => "Pipeline completed with warnings", 264CompletionState.CompletedWithError => "Pipeline completed with errors", 281public Task CompletePublishAsync(string? completionMessage = null, CompletionState? completionState = null, CancellationToken cancellationToken = default) 293private CompletionState CalculateOverallAggregatedState() 297return CompletionState.Completed; 300var maxState = CompletionState.InProgress; 303var stepState = step.CompletionState; 364CompletionState = ToBackchannelCompletionState(CompletionState.InProgress), 395CompletionState = ToBackchannelCompletionState(CompletionState.InProgress),
Pipelines\PipelineStepHelpers.cs (4)
92CompletionState.Completed, 99CompletionState.CompletedWithError, 132CompletionState.Completed, 139CompletionState.CompletedWithError,
Pipelines\PublishCompletionOptions.cs (1)
23public CompletionState? CompletionState { get; set; }
Pipelines\ReportingStep.cs (16)
53public CompletionState CompletionState 59private CompletionState _completionState = CompletionState.InProgress; 87internal CompletionState CalculateAggregatedState() 91return CompletionState.Completed; 94var maxState = CompletionState.InProgress; 167public async Task CompleteAsync(string completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 178public async Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 201if (CompletionState != CompletionState.InProgress) 207var finalState = CalculateAggregatedState(); 213CompletionState.Completed => $"{Title} completed successfully", 214CompletionState.CompletedWithWarning => $"{Title} completed with warnings", 215CompletionState.CompletedWithError => $"{Title} completed with errors",
Pipelines\ReportingTask.cs (7)
47public CompletionState CompletionState { get; internal set; } = CompletionState.InProgress; 68public async Task CompleteAsync(string? completionMessage = null, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 74public async Task CompleteAsync(MarkdownString completionMessage, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 85if (CompletionState != CompletionState.InProgress)
Publishing\PipelineExecutor.cs (1)
93await activityReporter.CompletePublishAsync(new PublishCompletionOptions { CompletionMessage = ex.Message, CompletionState = CompletionState.CompletedWithError }, stoppingToken).ConfigureAwait(false);
Publishing\PublishingExtensions.cs (12)
30await step.CompleteAsync(completionText, CompletionState.Completed, cancellationToken).ConfigureAwait(false); 46await step.CompleteAsync(message, CompletionState.Completed, cancellationToken).ConfigureAwait(false); 63await step.CompleteAsync(completionText, CompletionState.CompletedWithWarning, cancellationToken).ConfigureAwait(false); 79await step.CompleteAsync(message, CompletionState.CompletedWithWarning, cancellationToken).ConfigureAwait(false); 96await step.CompleteAsync(completionText, CompletionState.CompletedWithError, cancellationToken).ConfigureAwait(false); 112await step.CompleteAsync(errorMessage, CompletionState.CompletedWithError, cancellationToken).ConfigureAwait(false); 160await task.CompleteAsync(message, CompletionState.Completed, cancellationToken).ConfigureAwait(false); 176await task.CompleteAsync(message, CompletionState.Completed, cancellationToken).ConfigureAwait(false); 192await task.CompleteAsync(message, CompletionState.CompletedWithWarning, cancellationToken).ConfigureAwait(false); 208await task.CompleteAsync(message, CompletionState.CompletedWithWarning, cancellationToken).ConfigureAwait(false); 224await task.CompleteAsync(errorMessage, CompletionState.CompletedWithError, cancellationToken).ConfigureAwait(false); 240await task.CompleteAsync(errorMessage, CompletionState.CompletedWithError, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure (14)
AzureBicepResource.cs (3)
359CompletionState.Completed, 370CompletionState.Completed, 385CompletionState.CompletedWithError,
AzureEnvironmentResource.cs (9)
210CompletionState.Completed, 217CompletionState.CompletedWithError, 239CompletionState.Completed, 273CompletionState.Completed, 298CompletionState.Completed, 313CompletionState.Completed, 323CompletionState.Completed, 374CompletionState.Completed, 381CompletionState.CompletedWithError,
AzurePublishingContext.cs (2)
3660 => ("No azure compute environments found in the model.", CompletionState.CompletedWithWarning), 367_ => ($"Found {computeEnvironments.Count} compute environment(s) in the model.", CompletionState.Completed)
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppEnvironmentResource.cs (1)
166CompletionState.Completed,
Aspire.Hosting.Azure.AppService (4)
AzureAppServiceEnvironmentResource.cs (4)
251CompletionState.Completed, 262CompletionState.Completed, 303CompletionState.CompletedWithError, 312CompletionState.Completed,
Aspire.Hosting.Azure.ContainerRegistry (1)
AzureContainerRegistryHelpers.cs (1)
55CompletionState.Completed,
Aspire.Hosting.Azure.Kubernetes.Tests (13)
tests\Shared\TestPipelineActivityReporter.cs (13)
46public List<(string StepTitle, string CompletionText, CompletionState CompletionState)> CompletedSteps { get; } = []; 51public List<(string TaskStatusText, string? CompletionMessage, CompletionState CompletionState)> CompletedTasks { get; } = []; 71public Action<string, string, CompletionState>? OnStepCompleted { get; set; } 86public CompletionState? ResultCompletionState { get; private set; } 147public Task CompletePublishAsync(string? completionMessage = null, CompletionState? completionState = null, CancellationToken cancellationToken = default) 193public Task CompleteAsync(string completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 250public Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 272public Task CompleteAsync(string? completionMessage = null, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 300public Task CompleteAsync(MarkdownString completionMessage, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.Sandboxes (7)
AzureSandboxContainerDeployment.cs (7)
294await diskTask.CompleteAsync($"Created sandbox disk image {diskImageId}", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 320await createTask.CompleteAsync($"Created sandbox {sandboxId}", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 333await lifecycleTask.CompleteAsync("Lifecycle policy configured", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 363await exposeTask.CompleteAsync(new MarkdownString($"Public URL: [{endpointUrl}]({endpointUrl})"), CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 1293CompletionState.CompletedWithWarning, 1311CompletionState.Completed, 1426await cleanupTask.CompleteAsync($"Deleted stale sandbox deployment {sectionName}", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.Tests (30)
AzureAppServiceTests.cs (2)
226step.CompletionState == CompletionState.CompletedWithError); 264step.CompletionState == CompletionState.Completed);
AzureDeployerTests.cs (15)
183Assert.NotEqual(CompletionState.CompletedWithError, mockActivityReporter.ResultCompletionState); 238Assert.NotEqual(CompletionState.CompletedWithError, mockActivityReporter.ResultCompletionState); 293Assert.NotEqual(CompletionState.CompletedWithError, mockActivityReporter.ResultCompletionState); 353Assert.NotEqual(CompletionState.CompletedWithError, mockActivityReporter.ResultCompletionState); 419Assert.NotEqual(CompletionState.CompletedWithError, mockActivityReporter.ResultCompletionState); 487Assert.NotEqual(CompletionState.CompletedWithError, mockActivityReporter.ResultCompletionState); 547Assert.NotEqual(CompletionState.CompletedWithError, mockActivityReporter.ResultCompletionState); 631Assert.NotEqual(CompletionState.CompletedWithError, mockActivityReporter.ResultCompletionState); 894Assert.NotEqual(CompletionState.CompletedWithError, mockActivityReporter.ResultCompletionState); 956Assert.NotEqual(CompletionState.CompletedWithError, mockActivityReporter.ResultCompletionState); 1166Assert.NotEqual(CompletionState.CompletedWithError, mockActivityReporter.ResultCompletionState); 1448.Where(s => s.CompletionState == CompletionState.CompletedWithError) 1453.Where(t => t.CompletionState == CompletionState.CompletedWithError) 2083Assert.Equal(CompletionState.CompletedWithError, loginStep.CompletionState); 2105Assert.Equal(CompletionState.Completed, loginStep.CompletionState);
tests\Shared\TestPipelineActivityReporter.cs (13)
46public List<(string StepTitle, string CompletionText, CompletionState CompletionState)> CompletedSteps { get; } = []; 51public List<(string TaskStatusText, string? CompletionMessage, CompletionState CompletionState)> CompletedTasks { get; } = []; 71public Action<string, string, CompletionState>? OnStepCompleted { get; set; } 86public CompletionState? ResultCompletionState { get; private set; } 147public Task CompletePublishAsync(string? completionMessage = null, CompletionState? completionState = null, CancellationToken cancellationToken = default) 193public Task CompleteAsync(string completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 250public Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 272public Task CompleteAsync(string? completionMessage = null, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 300public Task CompleteAsync(MarkdownString completionMessage, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Docker (6)
DockerComposeEnvironmentResource.cs (6)
153CompletionState.Completed, 182CompletionState.Completed, 434CompletionState.Completed, 439await deployTask.CompleteAsync($"Compose deployment failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.CancellationToken).ConfigureAwait(false); 472CompletionState.Completed, 477await 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)
46public List<(string StepTitle, string CompletionText, CompletionState CompletionState)> CompletedSteps { get; } = []; 51public List<(string TaskStatusText, string? CompletionMessage, CompletionState CompletionState)> CompletedTasks { get; } = []; 71public Action<string, string, CompletionState>? OnStepCompleted { get; set; } 86public CompletionState? ResultCompletionState { get; private set; } 147public Task CompletePublishAsync(string? completionMessage = null, CompletionState? completionState = null, CancellationToken cancellationToken = default) 193public Task CompleteAsync(string completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 250public Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 272public Task CompleteAsync(string? completionMessage = null, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 300public Task CompleteAsync(MarkdownString completionMessage, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Foundry.Tests (13)
tests\Shared\TestPipelineActivityReporter.cs (13)
46public List<(string StepTitle, string CompletionText, CompletionState CompletionState)> CompletedSteps { get; } = []; 51public List<(string TaskStatusText, string? CompletionMessage, CompletionState CompletionState)> CompletedTasks { get; } = []; 71public Action<string, string, CompletionState>? OnStepCompleted { get; set; } 86public CompletionState? ResultCompletionState { get; private set; } 147public Task CompletePublishAsync(string? completionMessage = null, CompletionState? completionState = null, CancellationToken cancellationToken = default) 193public Task CompleteAsync(string completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 250public Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 272public Task CompleteAsync(string? completionMessage = null, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 300public Task CompleteAsync(MarkdownString completionMessage, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Java.Tests (13)
tests\Shared\TestPipelineActivityReporter.cs (13)
46public List<(string StepTitle, string CompletionText, CompletionState CompletionState)> CompletedSteps { get; } = []; 51public List<(string TaskStatusText, string? CompletionMessage, CompletionState CompletionState)> CompletedTasks { get; } = []; 71public Action<string, string, CompletionState>? OnStepCompleted { get; set; } 86public CompletionState? ResultCompletionState { get; private set; } 147public Task CompletePublishAsync(string? completionMessage = null, CompletionState? completionState = null, CancellationToken cancellationToken = default) 193public Task CompleteAsync(string completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 250public Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 272public Task CompleteAsync(string? completionMessage = null, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 300public Task CompleteAsync(MarkdownString completionMessage, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Kubernetes (7)
Deployment\HelmDeploymentEngine.cs (7)
199CompletionState.Completed, 267CompletionState.Completed, 274CompletionState.CompletedWithError, 492CompletionState.Completed, 500CompletionState.CompletedWithError, 619CompletionState.Completed, 627CompletionState.CompletedWithError,
Aspire.Hosting.Kubernetes.Tests (15)
KubernetesPublisherTests.cs (2)
971Assert.Equal(CompletionState.CompletedWithError, reporter.ResultCompletionState); 997Assert.Equal(CompletionState.CompletedWithError, reporter.ResultCompletionState);
tests\Shared\TestPipelineActivityReporter.cs (13)
46public List<(string StepTitle, string CompletionText, CompletionState CompletionState)> CompletedSteps { get; } = []; 51public List<(string TaskStatusText, string? CompletionMessage, CompletionState CompletionState)> CompletedTasks { get; } = []; 71public Action<string, string, CompletionState>? OnStepCompleted { get; set; } 86public CompletionState? ResultCompletionState { get; private set; } 147public Task CompletePublishAsync(string? completionMessage = null, CompletionState? completionState = null, CancellationToken cancellationToken = default) 193public Task CompleteAsync(string completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 250public Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 272public Task CompleteAsync(string? completionMessage = null, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 300public Task CompleteAsync(MarkdownString completionMessage, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Rust.Tests (15)
AddRustAppPublishTests.cs (2)
413Assert.Equal(CompletionState.CompletedWithError, reporter.ResultCompletionState); 468Assert.Equal(CompletionState.CompletedWithError, reporter.ResultCompletionState);
tests\Shared\TestPipelineActivityReporter.cs (13)
46public List<(string StepTitle, string CompletionText, CompletionState CompletionState)> CompletedSteps { get; } = []; 51public List<(string TaskStatusText, string? CompletionMessage, CompletionState CompletionState)> CompletedTasks { get; } = []; 71public Action<string, string, CompletionState>? OnStepCompleted { get; set; } 86public CompletionState? ResultCompletionState { get; private set; } 147public Task CompletePublishAsync(string? completionMessage = null, CompletionState? completionState = null, CancellationToken cancellationToken = default) 193public Task CompleteAsync(string completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 250public Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 272public Task CompleteAsync(string? completionMessage = null, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 300public Task CompleteAsync(MarkdownString completionMessage, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default)
Aspire.Hosting.Tests (111)
Pipelines\DistributedApplicationPipelineTests.cs (2)
903Assert.Contains(reporter.CompletedSteps, step => step.StepTitle == "failing-step" && step.CompletionState == CompletionState.CompletedWithError); 1273Assert.Contains(reporter.CompletedSteps, step => step.StepTitle == "failing-step" && step.CompletionState == CompletionState.CompletedWithError);
Pipelines\PipelineLoggerProviderTests.cs (3)
141public Task CompleteAsync(string statusText, CompletionState completionState, CancellationToken cancellationToken = default) 146public Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default)
Publishing\PipelineActivityReporterTests.cs (88)
39Assert.Equal(CompletionState.InProgress, stepInternal.CompletionState); 73await step.CompleteAsync("Done", CompletionState.Completed, CancellationToken.None); 126Assert.Equal(CompletionState.InProgress, taskInternal.CompletionState); 163await step.CompleteAsync("Completed", CompletionState.Completed, CancellationToken.None); 187await step.CompleteAsync(completionText, isError ? CompletionState.CompletedWithError : CompletionState.Completed, CancellationToken.None); 191Assert.NotEqual(CompletionState.InProgress, stepInternal.CompletionState); 267await step.CompleteAsync("Completed", CompletionState.Completed, CancellationToken.None); 297Assert.Equal(CompletionState.Completed, taskInternal.CompletionState); 321await step.CompleteAsync("Completed", CompletionState.Completed, CancellationToken.None); 332[InlineData(CompletionState.Completed, "Pipeline completed successfully", false)] 333[InlineData(CompletionState.CompletedWithError, "Pipeline completed with errors", true)] 334[InlineData(CompletionState.CompletedWithWarning, "Pipeline completed with warnings", false)] 335public async Task CompletePublishAsync_EmitsCorrectActivity(CompletionState completionState, string expectedStatusText, bool expectedIsError) 351Assert.Equal(completionState == CompletionState.CompletedWithWarning, activity.Data.IsWarning); 362await reporter.CompletePublishAsync(new PublishCompletionOptions { CompletionMessage = expectedStatusText, CompletionState = CompletionState.CompletedWithError }, CancellationToken.None); 387await step1.CompleteAsync("Step 1 completed", CompletionState.Completed, CancellationToken.None); 391await step2.CompleteAsync("Step 2 completed with warning", CompletionState.CompletedWithWarning, CancellationToken.None); 395await step3.CompleteAsync("Step 3 failed", CompletionState.CompletedWithError, CancellationToken.None); 451Assert.Equal(CompletionState.Completed, taskInternal.CompletionState); 464await task.CompleteAsync((string?)null, CompletionState.Completed, cancellationToken: CancellationToken.None); 470await task.CompleteAsync("Error", CompletionState.CompletedWithError, cancellationToken: CancellationToken.None); 476Assert.Equal(CompletionState.Completed, taskInternal.CompletionState); // Original state is retained 500Assert.Equal(CompletionState.Completed, stepInternal.CompletionState); 513await step.CompleteAsync("Complete", CompletionState.Completed, cancellationToken: CancellationToken.None); 519await step.CompleteAsync("Error", CompletionState.CompletedWithError, cancellationToken: CancellationToken.None); 525Assert.Equal(CompletionState.Completed, stepInternal.CompletionState); // Original state is retained 542await step.CompleteAsync("Step completed", CompletionState.Completed, CancellationToken.None); 553await task.CompleteAsync("Error", CompletionState.CompletedWithError, cancellationToken: CancellationToken.None); // Should also not throw (noop) 760var aggregatedState = stepInternal.CalculateAggregatedState(); 763Assert.Equal(CompletionState.Completed, aggregatedState); 781Assert.Equal(CompletionState.Completed, stepInternal.CompletionState); 815Assert.Equal(CompletionState.Completed, stepInternal.CompletionState); 836await step.CompleteAsync("Step completed manually", CompletionState.Completed, CancellationToken.None); 847Assert.Equal(CompletionState.Completed, stepInternal.CompletionState); 871Assert.Equal(CompletionState.CompletedWithWarning, taskInternal.CompletionState); 906Assert.Equal(CompletionState.CompletedWithError, taskInternal.CompletionState); 922[InlineData(CompletionState.Completed, "Pipeline completed successfully", false)] 923[InlineData(CompletionState.CompletedWithError, "Pipeline completed with errors", true)] 924[InlineData(CompletionState.CompletedWithWarning, "Pipeline completed with warnings", false)] 925public async Task CompletePublishAsync_WithDeployFlag_EmitsCorrectActivity(CompletionState completionState, string expectedStatusText, bool expectedIsError) 941Assert.Equal(completionState == CompletionState.CompletedWithWarning, activity.Data.IsWarning); 952await reporter.CompletePublishAsync(new PublishCompletionOptions { CompletionMessage = expectedStatusText, CompletionState = CompletionState.CompletedWithError }, CancellationToken.None); 978await reporter.CompletePublishAsync(new PublishCompletionOptions { CompletionState = CompletionState.Completed, PipelineSummary = pipelineSummary }, CancellationToken.None); 1005await reporter.CompletePublishAsync(new PublishCompletionOptions { CompletionState = CompletionState.Completed }, CancellationToken.None); 1102await step.CompleteAsync("Completed", CompletionState.Completed, CancellationToken.None); 1192await task.CompleteAsync(new MarkdownString("Deployed to **Azure**"), CompletionState.Completed, CancellationToken.None); 1211await step.CompleteAsync(new MarkdownString("Step **completed** successfully"), CompletionState.Completed, CancellationToken.None); 1231await task.CompleteAsync("Warning message", CompletionState.CompletedWithWarning, CancellationToken.None); 1237await task.CompleteAsync("Different warning message", CompletionState.CompletedWithWarning, CancellationToken.None); 1243Assert.Equal(CompletionState.CompletedWithWarning, taskInternal.CompletionState); 1256await task.CompleteAsync("Error message", CompletionState.CompletedWithError, CancellationToken.None); 1262await task.CompleteAsync("Different error message", CompletionState.CompletedWithError, CancellationToken.None); 1268Assert.Equal(CompletionState.CompletedWithError, taskInternal.CompletionState); 1280await step.CompleteAsync("Warning", CompletionState.CompletedWithWarning, CancellationToken.None); 1286await step.CompleteAsync("Different warning", CompletionState.CompletedWithWarning, CancellationToken.None); 1292Assert.Equal(CompletionState.CompletedWithWarning, stepInternal.CompletionState); 1304await step.CompleteAsync("Error", CompletionState.CompletedWithError, CancellationToken.None); 1310await step.CompleteAsync("Different error", CompletionState.CompletedWithError, CancellationToken.None); 1316Assert.Equal(CompletionState.CompletedWithError, stepInternal.CompletionState); 1320[InlineData(CompletionState.Completed, CompletionState.CompletedWithWarning)] 1321[InlineData(CompletionState.Completed, CompletionState.CompletedWithError)] 1322[InlineData(CompletionState.CompletedWithWarning, CompletionState.Completed)] 1323[InlineData(CompletionState.CompletedWithWarning, CompletionState.CompletedWithError)] 1324[InlineData(CompletionState.CompletedWithError, CompletionState.Completed)] 1325[InlineData(CompletionState.CompletedWithError, CompletionState.CompletedWithWarning)] 1326public async Task CompleteTaskAsync_IdempotentWhenTransitioningBetweenTerminalStates(CompletionState firstState, CompletionState secondState) 1351[InlineData(CompletionState.Completed, CompletionState.CompletedWithWarning)] 1352[InlineData(CompletionState.Completed, CompletionState.CompletedWithError)] 1353[InlineData(CompletionState.CompletedWithWarning, CompletionState.Completed)] 1354[InlineData(CompletionState.CompletedWithWarning, CompletionState.CompletedWithError)] 1355[InlineData(CompletionState.CompletedWithError, CompletionState.Completed)] 1356[InlineData(CompletionState.CompletedWithError, CompletionState.CompletedWithWarning)] 1357public async Task CompleteStepAsync_IdempotentWhenTransitioningBetweenTerminalStates(CompletionState firstState, CompletionState secondState)
Publishing\PublishingExtensionsTests.cs (5)
34Assert.Equal(CompletionState.InProgress, taskInternal.CompletionState); 51Assert.NotEqual(CompletionState.InProgress, stepInternal.CompletionState); 88Assert.Equal(CompletionState.Completed, taskInternal.CompletionState); 106Assert.Equal(CompletionState.CompletedWithWarning, taskInternal.CompletionState); 123Assert.Equal(CompletionState.CompletedWithError, taskInternal.CompletionState);
tests\Shared\TestPipelineActivityReporter.cs (13)
46public List<(string StepTitle, string CompletionText, CompletionState CompletionState)> CompletedSteps { get; } = []; 51public List<(string TaskStatusText, string? CompletionMessage, CompletionState CompletionState)> CompletedTasks { get; } = []; 71public Action<string, string, CompletionState>? OnStepCompleted { get; set; } 86public CompletionState? ResultCompletionState { get; private set; } 147public Task CompletePublishAsync(string? completionMessage = null, CompletionState? completionState = null, CancellationToken cancellationToken = default) 193public Task CompleteAsync(string completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 250public Task CompleteAsync(MarkdownString completionText, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 272public Task CompleteAsync(string? completionMessage = null, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default) 300public Task CompleteAsync(MarkdownString completionMessage, CompletionState completionState = CompletionState.Completed, CancellationToken cancellationToken = default)
Pipelines.AppHost (12)
AppHost.cs (12)
88CompletionState.CompletedWithWarning, 103CompletionState.CompletedWithWarning, 123CompletionState.CompletedWithWarning, 138CompletionState.CompletedWithWarning, 158CompletionState.CompletedWithWarning, 173CompletionState.CompletedWithWarning, 196CompletionState.CompletedWithWarning, 208CompletionState.CompletedWithWarning, 215CompletionState.Completed, 222CompletionState.CompletedWithWarning, 274CompletionState.CompletedWithWarning, 319CompletionState.Completed,
Pipelines.Library (7)
DistributedApplicationPipelineExtensions.cs (7)
88CompletionState.CompletedWithError, 100CompletionState.CompletedWithError, 107CompletionState.Completed, 119CompletionState.Completed, 137CompletionState.CompletedWithError, 163CompletionState.CompletedWithError, 170CompletionState.Completed,
SimplePipelines.AppHost (3)
AppHost.cs (3)
20CompletionState.Completed, 38CompletionState.Completed, 56CompletionState.Completed,