Repository navigation
Dev CI: UiSmokeWpf lock file pins xunit.v3 4.0.2, and two live test classes skip without DARLING_TEST_PG (#5755) - #5756
Conversation
|
Blind-read confirms the shape this PR describes. Before reading the PR body: Diffed the full hunk set against the PR body's inventory: No REVIEW-TRAPS.md line fits this diff (checked SQL, collectors, analysis, alerting, storage, tests/censuses, workflows, repository-mechanics sections — the closest, the |
There was a problem hiding this comment.
Verdict: LGTM
Claims
- VERIFIED — "#5746 then raised xunit.v3 to 4.0.2 in Directory.Packages.props, and its lock-file updates did not include the new project, so locked restore failed with NU1004 on dev" —
Directory.Packages.props:36pinsxunit.v3at4.0.2;Lite.Tests/packages.lock.json:14andDarling/Darling.Tests/packages.lock.json:14already resolve to4.0.2whiletools/ui-smoke-wpf/packages.lock.jsonwas still at4.0.1pre-PR (pergh pr diff);.github/workflows/build.yml:920runs a--locked-moderestore of that exact project, which is the check such a mismatch fails. - VERIFIED — "Lock diff against origin/dev: xunit.v3 4.0.1 to 4.0.2 (direct), its seven xunit.v3.* packages … Microsoft.Testing.Platform, …Telemetry and …TrxReport.Abstractions 2.4.0 to 2.5.1, and xunit.analyzers 2.1.0 to 2.2.0 … No PerformanceMonitor.* entry changes" — confirmed by diffing every changed key/value pair in
gh pr diff 5756: only those packages'resolved/requested/contentHashfields move, nothing else. - UNVERIFIED — "
dotnet restore PerformanceMonitor.sln --locked-mode --force-evaluatepasses locally: exit 0, no error lines, 19 projects restored" — a live restore result; this is a read-only tree with no .NET SDK invocation performed. - UNVERIFIED — "Fixes #5755" and the #5747/#5746 PR attribution — the issue/PR history is outside the allowed
ghsurface for this review (onlytools/ui-smoke-wpf/packages.lock.jsonis in this diff; prior PRs' content wasn't independently checked).
Riskiest lines
tools/ui-smoke-wpf/packages.lock.json:18(xunit.v3resolved 4.0.2) — the one direct-version bump everything else cascades from — pinned by.github/workflows/build.yml:920's locked-mode restore (NU1004 on any mismatch withDirectory.Packages.props).tools/ui-smoke-wpf/packages.lock.json:469(Microsoft.Testing.Platformresolved 2.5.1, transitive) — pinned the same way, via the same locked-mode restore walking the full graph.tools/ui-smoke-wpf/packages.lock.jsoncontentHashfields throughout — NuGet-computed; a wrong hash fails the same restore rather than silently installing a mismatched package.
Traps near this diff
- Repository mechanics: ".gitattributes says text=auto eol=crlf: … A diff that touches every line of a file is a line-ending conversion until proven otherwise" — does not apply: the diff is surgical hunks around the changed package entries (confirmed via
gh pr diff), not a whole-file rewrite. - No other REVIEW-TRAPS.md line (SQL, collectors/deltas, analysis, alerting, storage/MCP, tests/censuses, workflows/CI) is near a lock-file-only dependency bump; none apply.
Divergence (blind read vs PR body)
None — the body's account matches the diff on every claim graded above, including its explicit scoping note that the other three lock files the same restore rewrote (Lite, Darling Viewer, deprecated Dashboard) were reverted and deliberately excluded from this PR; gh pr diff --name-only confirms only tools/ui-smoke-wpf/packages.lock.json is in this diff.
Reviewer checklist
- Confirm CI's
buildjob restore step (.github/workflows/build.yml:920) and thewpf-smokeworkflow both go green on this PR — the body's local restore result and the unchecked "Build and WPF smoke pass in CI" box are both live results this read-only review couldn't reproduce.
|
Follow-up pass, scoped to Blind read: both Checked the PR body's claim that No REVIEW-TRAPS.md line applies to this range (checked tests/censuses and repository-mechanics sections specifically): this isn't a whole-file CRLF rewrite (surgical 4-line hunks per file), and |
There was a problem hiding this comment.
Verdict: LGTM
Claims
- VERIFIED — "Each class funnels every live fact through one helper (WithDrainAsync, WithRigAsync), so the fix is one Assert.SkipWhen(...) at the top of each helper, before ScratchPostgres.CreateAsync" — confirmed at
ExternalAlertDrainLifecycleLiveTests.cs:456-461andExternalAlertDrainLiveTests.cs:503-508; every[Fact]in both classes callsWithRigAsync/WithDrainAsyncdirectly (12 and 16 call sites respectively), so one guard covers every live fact in each class. - VERIFIED — "The skip leaves before any scratch database exists, so there is no teardown to run on a null connection string" — the new
Assert.SkipWhenline precedes theawait ScratchPostgres.CreateAsync(ConnectionString!, ct)call in both helpers; a thrownSkipExceptionshort-circuits before thetry/finallyteardown block is even entered. - VERIFIED — "ExternalAlertGrantLiveTests, ExternalAlertSourceGroupLiveTests and ExternalAlertSourceVerbLiveTests already skip, so nothing else changed" — all three already carry
Assert.SkipWhen(string.IsNullOrEmpty(baseConnectionString), …)guards per fact (confirmed via grep); this PR's diff touches only the two previously-ungated classes. - UNVERIFIED — "DARLING_TEST_PG unset, -class filters for the two classes: Total 36, Failed 0, Skipped 34 (the 34 live facts), 2 static facts passed" — a live
dotnet testrun result; not reproducible from a read-only tree.
Riskiest lines
Darling/Darling.Tests/ExternalAlertDrainLifecycleLiveTests.cs:458— the skip guard itself; if misplaced afterCreateAsyncit would reintroduce theArgumentNullExceptionon teardown — pinned by CI's Darling whole-tree guard job (no DARLING_TEST_PG) rerunning on this PR.Darling/Darling.Tests/ExternalAlertDrainLiveTests.cs:506— same shape, same risk, second class — pinned the same way.- Both guards rely on
ConnectionStringreadingEnvironment.GetEnvironmentVariable("DARLING_TEST_PG")correctly (ExternalAlertDrainLiveTests.cs:40,ExternalAlertDrainLifecycleLiveTests.cs:43) — unchanged by this PR, so UNPINNED only in the sense that no unit test asserts the getter itself, but it's identical to the already-working pattern in eight other live-test classes.
Traps near this diff
- Repository mechanics: "Lite and Darling ship in parity … a fix to one SKU's reader, tool, alert or description without the counterpart's is a finding" — does not apply:
ExternalAlertDrainand its live tests exist only underDarling/(find . -iname "*ExternalAlertDrain*"returns no Lite paths), so there is no Lite counterpart to update. - Tests/censuses: ".gitattributes … A diff that touches every line of a file is a line-ending conversion until proven otherwise" — does not apply: both hunks are surgical 4-line insertions, not whole-file rewrites.
Divergence (blind read vs PR body)
None — the body's account of this range (one SkipWhen per helper, placed before scratch-database creation, with the three other classes already gated) matches the diff and the surrounding code exactly.
Reviewer checklist
- Confirm the Darling whole-tree guard job (CI, no DARLING_TEST_PG) now shows 34 skips and 0 failures for these two classes, as the PR body's local
-class-filtered run claims.
Claude posting for Erik Darling.
Fixes #5755.
#5747 added tools/ui-smoke-wpf with its own packages.lock.json. #5746 then raised xunit.v3 to 4.0.2 in Directory.Packages.props, and its lock-file updates did not include the new project, so locked restore failed with NU1004 on dev. This regenerates that one lock file with
dotnet restore --force-evaluate.The second red on dev is in the Darling whole-tree guard job (CI run 38407981487): 34 failures, all in
ExternalAlertDrainLiveTests(21) andExternalAlertDrainLifecycleLiveTests(13), both added by #5726. Each threwArgumentNullException (Parameter 'Host'), and so did the scratch-database teardown. That job has noDARLING_TEST_PG, and these two classes read it but never skipped. Each class funnels every live fact through one helper (WithDrainAsync,WithRigAsync), so the fix is oneAssert.SkipWhen(string.IsNullOrEmpty(ConnectionString), ...)at the top of each helper, beforeScratchPostgres.CreateAsync. The skip leaves before any scratch database exists, so there is no teardown to run on a null connection string.ExternalAlertStoreLiveTestsgates the same way, per fact;ExternalAlertGrantLiveTests,ExternalAlertSourceGroupLiveTestsandExternalAlertSourceVerbLiveTestsalready skip, so nothing else changed. Each fix alone would still leave CI red on the other, so both are here.Test plan
dotnet restore PerformanceMonitor.sln --locked-mode --force-evaluatepasses locally: exit 0, no error lines, 19 projects restoredDarling.Testsbuilds in Debug: 0 warnings, 0 errorsDARLING_TEST_PGunset,-classfilters for the two classes: Total 36, Failed 0, Skipped 34 (the 34 live facts), 2 static facts passedDARLING_TEST_PGunset, every*Census*and*Ratchet*class plusLivePostgresCollectionHygieneTests: Total 575, Failed 0, Skipped 1Notes
--locked-moderun after the forced restore reported "All projects are up-to-date for restore", so the check above adds--force-evaluateto make NuGet re-evaluate each project.Changelog
SECTION: None
ENTRY: none (CI only)