Skip to content

ci: make repro-mtls-flake.ps1 oracle cleanup not throw on clean start#577

Merged
DavidCozens merged 1 commit into
mainfrom
ci/fix-repro-script-native-kill
Jun 17, 2026
Merged

ci: make repro-mtls-flake.ps1 oracle cleanup not throw on clean start#577
DavidCozens merged 1 commit into
mainfrom
ci/fix-repro-script-native-kill

Conversation

@DavidCozens

@DavidCozens DavidCozens commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Follow-up to #576.

Problem

The repro script cleared stale oracles with taskkill /F /IM otelcol-contrib.exe 2>$null. Under $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". (It only appeared to work when a stale otelcol happened to be present, so taskkill succeeded.)

Fix

Replace both taskkill calls with a PowerShell-native, non-throwing kill:

Get-Process otelcol-contrib -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue

Verification

On a native Windows box: 60/60 @mtls iterations pass under -Stress, confirming the stderr-drain fix from #576 holds under sustained CPU load (no 0 of 1 stalls).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Enhanced process termination reliability in the mTLS flake reproduction utility during startup and shutdown sequences.

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) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 97c74110-701a-4e84-9998-637d71790d03

📥 Commits

Reviewing files that changed from the base of the PR and between 38d28f4 and f6d901c.

📒 Files selected for processing (1)
  • scripts/repro-mtls-flake.ps1

📝 Walkthrough

Walkthrough

The PowerShell script scripts/repro-mtls-flake.ps1 replaces two taskkill invocations for terminating the otelcol-contrib process with PowerShell-native Get-Process otelcol-contrib | Stop-Process -Force calls, applied in both the pre-start cleanup and the finally block. No other logic changes.

Changes

otelcol-contrib Process Termination

Layer / File(s) Summary
Replace taskkill with Stop-Process in pre-start and finally blocks
scripts/repro-mtls-flake.ps1
Both the pre-start cleanup (line 84) and the finally block (line 127) replace taskkill with Get-Process otelcol-contrib | Stop-Process -Force with silent error handling.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 Two little taskkills hopped away,
PowerShell pipes took their place today,
Get-Process whispers, Stop-Process roars,
No more old Windows commands at the doors,
The rabbit nods — cleaner script hooray! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title correctly summarizes the main change: replacing taskkill with PowerShell-native cleanup to prevent errors on clean system startup.
Description check ✅ Passed The description provides problem statement, fix details, and verification results, but lacks explicit sections matching the template (Purpose, Change Description, Test Evidence, Areas Affected).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/fix-repro-script-native-kill

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   🚦   build-linux-gcc: 100% successful (✔️ 1521 passed)
   🚦   build-freertos-host-tdd-plustcp: 100% successful (✔️ 1872 passed)
   🚦   build-linux-clang: 100% successful (✔️ 1453 passed)
   🚦   sanitize-linux-gcc: 100% successful (✔️ 1453 passed)
   🚦   integration-linux-openssl: 100% successful (✔️ 16 passed)
   🚦   integration-linux-mbedtls: 100% successful (✔️ 14 passed)
   🚦   integration-windows-openssl: 100% successful (✔️ 16 passed)
   🚦   bdd-linux-syslog-ng: 94% successful (✔️ 49 passed, 🙈 3 skipped)
   🚦   bdd-windows-otel: 88% successful (✔️ 46 passed, 🙈 6 skipped)
   🚦   bdd-freertos-qemu-plustcp: 87% successful (✔️ 45 passed, 🙈 7 skipped)
   🚦   bdd-freertos-qemu-lwip: 87% successful (✔️ 45 passed, 🙈 7 skipped)
   🚦   build-windows-msvc: 100% successful (✔️ 1298 passed)
   🚦   build-linux-tunable-override: 100% successful (✔️ 1453 passed)
   ⚠️   Clang-Tidy: No warnings
   ⚠️   CPPCheck: No warnings


Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result.

@DavidCozens DavidCozens merged commit e56c34f into main Jun 17, 2026
28 checks passed
@DavidCozens DavidCozens deleted the ci/fix-repro-script-native-kill branch June 17, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant