petri: Capture watson events after test failures (#4109) - #4193
Merged
Matt LaFayette (Kurjanowicz) (mattkur) merged 1 commit intoAug 8, 2026
Conversation
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)
Matt LaFayette (Kurjanowicz) (mattkur)
requested a review
from a team
as a code owner
August 7, 2026 21:55
Copilot started reviewing on behalf of
Matt LaFayette (Kurjanowicz) (mattkur)
August 7, 2026 21:55
View session
Ben Hillis (benhillis)
approved these changes
Aug 7, 2026
Contributor
There was a problem hiding this comment.
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_wineventto support provider filtering and makes it robust toGet-WinEventreturning[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. |
Matt LaFayette (Kurjanowicz) (mattkur)
merged commit Aug 8, 2026
e31c820
into
microsoft:release/1.8.2607
64 of 65 checks passed
Matt LaFayette (Kurjanowicz) (mattkur)
deleted the
cherrypick/release/1.8.2607/pr-4109
branch
August 8, 2026 21:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.