[Failing test]: Aspire.Hosting.Tests.Pipelines.DistributedApplicationPipelineTests.ExecuteAsync\_WithDependencyFailure\_ReportsFailedDependency
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Build information
Build: https://github.com/microsoft/aspire/actions/runs/24430558259
Build error leg or test failing: Aspire.Hosting.Tests.Pipelines.DistributedApplicationPipelineTests.ExecuteAsync\_WithDependencyFailure\_ReportsFailedDependency
Logs: [Tests / Hosting-4 / Hosting-4 \(windows-latest\)](https://github.com/microsoft/aspire/actions/runs/24430558259/job/71380731939)
Artifact: [All-TestResults](https://github.com/microsoft/aspire/actions/runs/24430558259/artifacts/6442703433)
### Fill in the error message template
## Error Message
Fill the error message using [step by step known issues guidance](https://github.com/dotnet/arcade/blob/main/Documentation/Projects/Build%20Analysis/KnownIssueJsonStepByStep.md).
```json
{
"ErrorMessage": "Assert.Throws() Failure: Exception type was not an exact match",
"ErrorPattern": "",
"BuildRetry": false,
"ExcludeConsoleLog": false
}
```
### Error details
Error details (40 lines)
```yml
Error Message: Assert.Throws() Failure: Exception type was not an exact match
Expected: typeof(System.InvalidOperationException)
Actual: typeof(System.AggregateException)
---- System.AggregateException : Multiple pipeline steps failed: destroy, failing-dependency (Step 'destroy' failed: A task was canceled.) (Step 'failing-dependency' failed: Dependency failed)
-------- System.InvalidOperationException : Step 'destroy' failed: A task was canceled.
------------ System.Threading.Tasks.TaskCanceledException : A task was canceled.
-------- System.InvalidOperationException : Step 'failing-dependency' failed: Dependency failed
------------ System.InvalidOperationException : Dependency failed
Stack Trace:
at Microsoft.AspNetCore.InternalTesting.AsyncTestHelpers.TimeoutAfter[T](Task`1 task, TimeSpan timeout, String filePath, Int32 lineNumber) in D:\a\aspire\aspire\tests\Shared\AsyncTestHelpers.cs:line 156
at Aspire.Hosting.Tests.Pipelines.DistributedApplicationPipelineTests.ExecuteAsync_WithDependencyFailure_ReportsFailedDependency() in D:\a\aspire\aspire\tests\Aspire.Hosting.Tests\Pipelines\DistributedApplicationPipelineTests.cs:line 756
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.ExecuteStepsAsTaskDag(List`1 steps, Dictionary`2 stepsByName, PipelineContext context) in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 774
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.ExecuteAsync(PipelineContext context) in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 393
----- Inner Stack Trace #1 (System.InvalidOperationException) -----
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.ExecuteStepAsync(PipelineStep step, PipelineStepContext stepContext) in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 895
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.<>c__DisplayClass19_1.<g__ExecuteStepWithDependencies|0>d.MoveNext() in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 699
--- End of stack trace from previous location ---
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.<>c__DisplayClass19_1.<g__ExecuteStepWithDependencies|0>d.MoveNext() in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 707
--- End of stack trace from previous location ---
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.<>c__DisplayClass19_1.<g__ExecuteStepWithDependencies|0>d.MoveNext() in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 713
----- Inner Stack Trace -----
at Aspire.Hosting.Pipelines.Internal.DeploymentStateManagerBase`1.ClearAllStateAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Pipelines/Internal/DeploymentStateManagerBase.cs:line 320
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.<>c.<<-ctor>b__3_13>d.MoveNext() in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 278
--- End of stack trace from previous location ---
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.ExecuteStepAsync(PipelineStep step, PipelineStepContext stepContext) in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 883
----- Inner Stack Trace #2 (System.InvalidOperationException) -----
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.ExecuteStepAsync(PipelineStep step, PipelineStepContext stepContext) in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 895
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.<>c__DisplayClass19_1.<g__ExecuteStepWithDependencies|0>d.MoveNext() in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 699
--- End of stack trace from previous location ---
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.<>c__DisplayClass19_1.<g__ExecuteStepWithDependencies|0>d.MoveNext() in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 707
--- End of stack trace from previous location ---
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.<>c__DisplayClass19_1.<g__ExecuteStepWithDependencies|0>d.MoveNext() in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 713
--- End of stack trace from previous location ---
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.ExecuteStepsAsTaskDag(List`1 steps, Dictionary`2 stepsByName, PipelineContext context) in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 747
----- Inner Stack Trace -----
at Aspire.Hosting.Tests.Pipelines.DistributedApplicationPipelineTests.<>c.<b__27_0>d.MoveNext() in D:\a\aspire\aspire\tests\Aspire.Hosting.Tests\Pipelines\DistributedApplicationPipelineTests.cs:line 744
--- End of stack trace from previous location ---
at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.ExecuteStepAsync(PipelineStep step, PipelineStepContext stepContext) in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 883
```
Standard Output
```yml
[CreateStep] deploy
[CreateStep] failing-dependency
[CreateStep] process-parameters
[CreateStep] deploy-prereq
[Information:deploy-prereq] Initializing deployment for environment 'Production'
| [2026-04-15T03:19:44] Aspire.Hosting.Tests.Pipelines.DistributedApplicationPipelineTests Information: Initializing deployment for environment 'Production'
[Information:deploy-prereq] Setting default deploy tag 'aspire-deploy-20260415031944' for compute resource(s).
| [2026-04-15T03:19:44] Aspire.Hosting.Tests.Pipelines.DistributedApplicationPipelineTests Information: Setting default deploy tag 'aspire-deploy-20260415031944' for compute resource(s).
[CreateStep] build
[CreateStep] build-prereq
[CreateStep] push-prereq
[CreateStep] push
[CreateStep] publish
[CreateStep] publish-prereq
[CreateStep] diagnostics
[Information:diagnostics]
PIPELINE DEPENDENCY GRAPH DIAGNOSTICS
=====================================
This diagnostic output shows the complete pipeline dependency graph structure.
Use this to understand step relationships and troubleshoot execution issues.
Total steps defined: 14
Analysis for full pipeline execution (showing all steps and their relationships)
EXECUTION ORDER
===============
This shows the order in which steps would execute, respecting all dependencies.
Steps with no dependencies run first, followed by steps that depend on them.
1. build
2. process-parameters
3. build-prereq
4. failing-dependency
5. dependent-step
6. deploy
7. deploy-prereq
8. destroy
9. destroy-prereq
10. diagnostics
11. publish
12. publish-prereq
13. push-prereq
14. push
DETAILED STEP ANALYSIS
======================
Shows each step's dependencies, associated resources, tags, and descriptions.
✓ = dependency exists, ? = dependency missing
Step: build
Description: Aggregation step for all build operations. All build steps should be required by this step.
Dependencies: none
Step: build-prereq
Description: Prerequisite step that runs before any build operations.
Dependencies: ✓ process-parameters
Step: dependent-step
Dependencies: ✓ failing-dependency
Step: deploy
Description: Aggregation step for all deploy operations. All deploy steps should be required by this step.
Dependencies: none
Step: deploy-prereq
Description: Prerequisite step that runs before any deploy operations. Initializes deployment environment and manages deployment state.
Dependencies: ✓ process-parameters
Step: destroy
Description: Aggregation step for all destroy operations. All destroy steps should be required by this step.
Dependencies: none
Step: destroy-prereq
Description: Prerequisite step that runs before any destroy operations.
Dependencies: none
Step: diagnostics
Description: Dumps dependency graph information for troubleshooting pipeline execution.
Dependencies: none
Step: failing-dependency
Dependencies: none
Step: process-parameters
Description: Prompts for parameter values before build, publish, or deployment operations.
Dependencies: none
Step: publish
Description: Aggregation step for all publish operations. All publish steps should be required by this step.
Dependencies: none
Step: publish-prereq
Description: Prerequisite step that runs before any publish operations.
Dependencies: ✓ process-parameters
Step: push
Description: Aggregation step for all push operations. All push steps should be required by this step.
Dependencies: ✓ push-prereq
Step: push-prereq
Description: Prerequisite step that runs before any push operations.
Dependencies: none
POTENTIAL ISSUES:
Identifies problems in the pipeline configuration that could prevent execution.
─────────────────
INFO: Orphaned steps (no dependencies, not required by others):
- build
- deploy
- destroy
- destroy-prereq
- diagnostics
- publish
EXECUTION SIMULATION ("What If" Analysis):
Shows what steps would run for each possible target step and in what order.
Steps at the same level can run concurrently.
─────────────────────────────────────────────────────────────────────────────
If targeting 'build':
Direct dependencies: none
Total steps: 1
Execution order:
[0] build
If targeting 'build-prereq':
Direct dependencies: process-parameters
Total steps: 2
Execution order:
[0] process-parameters
[1] build-prereq
If targeting 'dependent-step':
Direct dependencies: failing-dependency
Total steps: 2
Execution order:
[0] failing-dependency
[1] dependent-step
If targeting 'deploy':
Direct dependencies: none
Total steps: 1
Execution order:
[0] deploy
If targeting 'deploy-prereq':
Direct dependencies: process-parameters
Total steps: 2
Execution order:
[0] process-parameters
[1] deploy-prereq
If targeting 'destroy':
Direct dependencies: none
Total steps: 1
Execution order:
[0] destroy
If targeting 'destroy-prereq':
Direct dependencies: none
Total steps: 1
Execution order:
[0] destroy-prereq
If targeting 'diagnostics':
Direct dependencies: none
Total steps: 1
Execution order:
[0] diagnostics
If targeting 'failing-dependency':
Direct dependencies: none
Total steps: 1
Execution order:
[0] failing-dependency
If targeting 'process-parameters':
Direct dependencies: none
Total steps: 1
Execution order:
[0] process-parameters
If targeting 'publish':
Direct dependencies: none
Total steps: 1
Execution order:
[0] publish
If targeting 'publish-prereq':
Direct dependencies: process-parameters
Total steps: 2
Execution order:
[0] process-parameters
[1] publish-prereq
If targeting 'push':
Direct dependencies: push-prereq
Total steps: 2
Execution order:
[0] push-prereq
[1] push
If targeting 'push-prereq':
Direct dependencies: none
Total steps: 1
Execution order:
[0] push-prereq
[Error:failing-dependency] Step 'failing-dependency' failed.
| [2026-04-15T03:19:44] Aspire.Hosting.Tests.Pipelines.DistributedApplicationPipelineTests Error: Step 'failing-dependency' failed.
| System.InvalidOperationException: Step 'failing-dependency' failed: Dependency failed
| ---> System.InvalidOperationException: Dependency failed
| at Aspire.Hosting.Tests.Pipelines.DistributedApplicationPipelineTests.<>c.<b__27_0>d.MoveNext() in D:\a\aspire\aspire\tests\Aspire.Hosting.Tests\Pipelines\DistributedApplicationPipelineTests.cs:line 744
| --- End of stack trace from previous location ---
| at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.ExecuteStepAsync(PipelineStep step, PipelineStepContext stepContext) in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 883
| --- End of inner exception stack trace ---
| at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.ExecuteStepAsync(PipelineStep step, PipelineStepContext stepContext) in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 895
| at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.<>c__DisplayClass19_1.<g__ExecuteStepWithDependencies|0>d.MoveNext() in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 699
[CreateStep] destroy
[CompleteStep:failing-dependency] Step 'failing-dependency' failed: Dependency failed (State: CompletedWithError)
[CreateStep] destroy-prereq
[Error:destroy] Step 'destroy' failed.
| [2026-04-15T03:19:44] Aspire.Hosting.Tests.Pipelines.DistributedApplicationPipelineTests Error: Step 'destroy' failed.
| System.InvalidOperationException: Step 'destroy' failed: A task was canceled.
| ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
| at Aspire.Hosting.Pipelines.Internal.DeploymentStateManagerBase`1.ClearAllStateAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Pipelines/Internal/DeploymentStateManagerBase.cs:line 320
| at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.<>c.<<-ctor>b__3_13>d.MoveNext() in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 278
| --- End of stack trace from previous location ---
| at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.ExecuteStepAsync(PipelineStep step, PipelineStepContext stepContext) in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 883
| --- End of inner exception stack trace ---
| at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.ExecuteStepAsync(PipelineStep step, PipelineStepContext stepContext) in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 895
| at Aspire.Hosting.Pipelines.DistributedApplicationPipeline.<>c__DisplayClass19_1.<g__ExecuteStepWithDependencies|0>d.MoveNext() in /_/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs:line 699
[CompleteStep:destroy] Step 'destroy' failed: A task was canceled. (State: CompletedWithError)
```
📊 **[View CI Failure Report](https://github.com/microsoft/aspire/issues/16190#issuecomment-4249403779)**
Contributor guide
Assessment
This issue has not been assessed yet.