From f6d901cb928295e94cb29b5d5666554add0d3fb3 Mon Sep 17 00:00:00 2001 From: David Cozens Date: Wed, 17 Jun 2026 16:33:20 +0100 Subject: [PATCH] ci: make repro-mtls-flake.ps1 oracle cleanup not throw on clean start MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script used `taskkill /F /IM otelcol-contrib.exe 2>$null` to clear stale oracles, but with $ErrorActionPreference='Stop' (and PowerShell 5.1's handling of native-command stderr) the "process not found" message taskkill emits when nothing is running becomes a terminating error. On a clean box — no leftover otelcol — the startup cleanup throws before the oracle is ever started, which surfaced as "not finding the oracle". Replace both taskkill calls with a PowerShell-native, non-throwing kill: Get-Process otelcol-contrib -ErrorAction SilentlyContinue | Stop-Process -Force. Verified: 60/60 @mtls iterations pass under -Stress on a native Windows box, confirming the stderr-drain fix (PR #576) holds under load. Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/repro-mtls-flake.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/repro-mtls-flake.ps1 b/scripts/repro-mtls-flake.ps1 index ae620163..8d19de16 100644 --- a/scripts/repro-mtls-flake.ps1 +++ b/scripts/repro-mtls-flake.ps1 @@ -81,7 +81,7 @@ $stressJobs = @() $otel = $null try { Write-Host "Starting otelcol-contrib oracle..." -ForegroundColor Cyan - taskkill /F /IM otelcol-contrib.exe 2>$null | Out-Null + Get-Process otelcol-contrib -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue $otel = Start-Process -FilePath $otelBin -ArgumentList "--config=$otelConfig" ` -RedirectStandardOutput (Join-Path $outDir 'otelcol.out') ` -RedirectStandardError (Join-Path $outDir 'otelcol.err') ` @@ -124,5 +124,5 @@ try { } finally { if ($stressJobs) { $stressJobs | Remove-Job -Force -ErrorAction SilentlyContinue } - taskkill /F /IM otelcol-contrib.exe 2>$null | Out-Null + Get-Process otelcol-contrib -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue }