Skip to content

petri: Capture watson events after test failures (#4109) - #4193

Merged
Matt LaFayette (Kurjanowicz) (mattkur) merged 1 commit into
microsoft:release/1.8.2607from
mattkur:cherrypick/release/1.8.2607/pr-4109
Aug 8, 2026
Merged

petri: Capture watson events after test failures (#4109)#4193
Matt LaFayette (Kurjanowicz) (mattkur) merged 1 commit into
microsoft:release/1.8.2607from
mattkur:cherrypick/release/1.8.2607/pr-4109

Conversation

@mattkur

Copy link
Copy Markdown
Contributor

Clean cherry pick of PR #4109

In cases where processes on windows hit a FAIL_FAST they will leave no trace behind in our other logging. No panic stack, no log messages, they just disappear. The only hint that this is happening is if Watson collects a dump. Capture watson events on test failures on windows machines so that we can see when this happens, and get a link straight to the watson bucket.

In cases where processes on windows hit a FAIL_FAST they will leave no
trace behind in our other logging. No panic stack, no log messages, they
just disappear. The only hint that this is happening is if Watson
collects a dump. Capture watson events on test failures on windows
machines so that we can see when this happens, and get a link straight
to the watson bucket.

(cherry picked from commit 41d6428)
Copilot AI lite review requested due to automatic review settings August 7, 2026 21:55
@github-actions github-actions Bot added the release_1.8.2607 Targets the release/1.8.2607 branch. label Aug 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances Petri’s Windows failure diagnostics by capturing Windows Error Reporting (WER) / Azure Watson event log entries when a test fails, enabling correlation to Watson report IDs and crash dumps for otherwise “silent” FAIL_FAST-style terminations.

Changes:

  • Refactors Windows event logging into WinEvent::write_to() so events can be logged consistently from multiple call sites.
  • Extends run_get_winevent to support provider filtering and makes it robust to Get-WinEvent returning [null] on soft-failures.
  • Adds a Windows-only post-test hook that, on test failure, writes WER/Watson events since test start into watson_events.log.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
petri/src/vm/hyperv/vm.rs Switches Hyper-V VM event logging to use the new centralized WinEvent::write_to() helper.
petri/src/vm/hyperv/powershell.rs Adds provider filtering, improves JSON parsing robustness, introduces watson_events() and WinEvent::write_to().
petri/src/test.rs Registers a Windows-only post-test hook to collect Watson/WER events on test failure into an attached log file.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

@mattkur
Matt LaFayette (Kurjanowicz) (mattkur) merged commit e31c820 into microsoft:release/1.8.2607 Aug 8, 2026
64 of 65 checks passed
@mattkur
Matt LaFayette (Kurjanowicz) (mattkur) deleted the cherrypick/release/1.8.2607/pr-4109 branch August 8, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_1.8.2607 Targets the release/1.8.2607 branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants