microsoft / microsoft/aspire

[CI Failure] Flaky: TelemetryHookScriptTests pwsh hook process does not exit within 30 seconds on Windows

Open
#20,121 0 comments 0 reactions 0 assignees View on GitHub
ci-failure-cause test-failure
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/34870408493
Build error leg or test failing: Tests / No-package tests (regular, Aspire.Cli.Tests, Cli, Cli, tests/Aspire.Cli.Tests/Aspire.Cli.Tests.cs... / Cli (windows-latest) / `Aspire.Cli.Tests.Agents.TelemetryHookScriptTests.Pwsh_ReferenceFileRead_CopilotStringArgs_ForwardsRelativePath`
Pull request: #20039

## Classification Analysis

Timeout waiting for an external pwsh process to exit, in a test area not touched by the PR (which only adds a sync workflow and infrastructure test harness files); indicates external-process timing flakiness on the Windows runner rather than a code defect introduced by the PR.

## Failure Information

Test output

Error:

System.TimeoutException : Hook process 'pwsh' did not exit within 30 seconds.

Stack Trace:
at Aspire.Cli.Tests.Agents.TelemetryHookScriptTests.RunProcess(String fileName, IReadOnlyList`1 arguments, String stdinPayload, Dictionary`2 environment) in D:\a\aspire\aspire\tests\Aspire.Cli.Tests\Agents\TelemetryHookScriptTests.cs:line 593
at Aspire.Cli.Tests.Agents.TelemetryHookScriptTests.RunPwshHookAsync(String payload, Dictionary`2 extraEnv) in D:\a\aspire\aspire\tests\Aspire.Cli.Tests\Agents\TelemetryHookScriptTests.cs:line 450
at Aspire.Cli.Tests.Agents.TelemetryHookScriptTests.Pwsh_ReferenceFileRead_CopilotStringArgs_ForwardsRelativePath() in D:\a\aspire\aspire\tests\Aspire.Cli.Tests\Agents\TelemetryHookScriptTests.cs:line 420
--- End of stack trace from previous location ---

Standard Output:
Temporary workspace created at: C:\Users\runneradmin\AppData\Local\Temp\Aspire.Cli.Tests\Workspace\14114af0.bpa
Disposing temporary workspace at: C:\Users\runneradmin\AppData\Local\Temp\Aspire.Cli.Tests\Workspace\14114af0.bpa

## Description

Flaky: TelemetryHookScriptTests pwsh hook process does not exit within 30 seconds on Windows

**Type**: flaky-test

## Occurrences

| Date | Build | Job | PR |
|------|-------|-----|----|
| 2026-09-14 | [34870408493](https://github.com/microsoft/aspire/actions/runs/34870408493) | Tests / No-package tests (regular, Aspire.Cli.Tests, Cli, Cli, tests/Aspire.Cli.Tests/Aspire.Cli.Tests.cs... / Cli (windows-latest) | #20039 |

Contributor guide

Open the contributing guide

Research direction

Start in tests/Aspire.Cli.Tests/Agents/TelemetryHookScriptTests.cs, especially Pwsh_ReferenceFileRead_CopilotStringArgs_ForwardsRelativePath, RunPwshHookAsync, and RunProcess around lines 420, 450, and 593. Reproduce the Windows pwsh timeout from the CI run and inspect the process exit handling; done means the test reliably completes on windows-latest without timing out.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.