Skip to content

Commit 0921029

Browse files
github-actions[bot]stephentoubCopilot
authored
Update @github/copilot to 1.0.83-5 (#2516)
* Update Copilot CLI to 1.0.83-5 - Updated the Node.js CLI release pin - Re-ran code generators - Formatted generated code * Fix Java MCP server coverage test Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Format Java MCP server coverage test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix transient Windows .NET timing failures Avoid surfacing a diagnostic stderr drain timeout after the owned process has exited, and allow Windows shell commands enough time to start before testing runtime timeout cleanup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 3428b36 commit 0921029

39 files changed

Lines changed: 1689 additions & 123 deletions

dotnet/src/Client.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,13 @@ private static async Task CleanupCliProcessAsync(Process childProcess, ProcessSt
762762
s_stderrPumpShutdownTimeout);
763763
}
764764

765-
AddCleanupError(errors, ex, logger);
765+
// Once the owned process has exited, stderr is diagnostic-only. A descendant
766+
// can briefly retain the inherited pipe on Windows, but that must not turn a
767+
// successful process shutdown into a client cleanup failure.
768+
if (!processExited)
769+
{
770+
AddCleanupError(errors, ex, logger);
771+
}
766772
}
767773
catch (Exception ex)
768774
{

dotnet/src/Generated/Rpc.cs

Lines changed: 250 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/src/Generated/SessionEvents.cs

Lines changed: 108 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/test/E2E/RpcShellEdgeCaseE2ETests.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,21 @@ public async Task Shell_Exec_With_Timeout_Kills_Long_Running_Command()
2828
var markerPath = Path.Join(Ctx.WorkDir, $"shell-timeout-{Guid.NewGuid():N}.txt");
2929
var startedPath = Path.Join(Ctx.WorkDir, $"shell-timeout-started-{Guid.NewGuid():N}.txt");
3030

31-
// Sleep 30s but timeout at 200ms — runtime should SIGTERM the child before the
31+
// Sleep 30s but use a much shorter timeout — runtime should SIGTERM the child before the
3232
// sleep completes, which means the marker file must NEVER appear within a wait
3333
// window comfortably greater than the timeout but well under the sleep duration.
34+
// Process startup on Windows can exceed 200ms on loaded runners, so match the
35+
// platform-specific allowance used by the Rust coverage for this RPC.
36+
var timeout = OperatingSystem.IsWindows()
37+
? TimeSpan.FromSeconds(2)
38+
: TimeSpan.FromMilliseconds(200);
3439
var command = OperatingSystem.IsWindows()
35-
? $"echo started>\"{startedPath}\" & for /L %i in (1,1,2147483647) do @rem & echo should-not-exist>\"{markerPath}\""
40+
? $"powershell -NoLogo -NoProfile -Command \"Set-Content -LiteralPath '{startedPath}' -Value started; Start-Sleep -Seconds 30; Set-Content -LiteralPath '{markerPath}' -Value should-not-exist\""
3641
: $"printf 'started' > '{startedPath}'; sleep 30; printf 'should-not-exist' > '{markerPath}'";
3742

3843
// On Windows, terminating the shell wrapper can briefly leave children alive.
3944
// Keep this long-running command outside the fixture workspace so cleanup is not blocked by cwd handles.
40-
var result = await session.Rpc.Shell.ExecAsync(command, cwd: Path.GetTempPath(), timeout: TimeSpan.FromMilliseconds(200));
45+
var result = await session.Rpc.Shell.ExecAsync(command, cwd: Path.GetTempPath(), timeout: timeout);
4146
Assert.False(string.IsNullOrWhiteSpace(result.ProcessId));
4247

4348
await TestHelper.WaitForConditionAsync(

0 commit comments

Comments
 (0)