Repository navigation
fix: make render test logging initialization idempotent - #13889
Conversation
Co-Authored-By: Oz <[email protected]> Co-Authored-By: Ben Navetta <[email protected]>
|
Independently reached the same diagnosis before spotting this PR: reproduced the 8 full-suite-only failures on master (first panic is the SetLoggerError inside the Once closure — a logger-install collision with the try_init() helper in content/find_tests.rs — and the other 7 are the poisoned-Once fallout), and arrived at this exact diff. Verified with it applied: 479/479, twice in a row, clippy/fmt clean. (Note, as an external-contributor, I don't have maintainer access, or the ability to mark this fix as a non-draft, or the ability to formally review this) |
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR makes the render test logging helper tolerate a process-global logger that may already be initialized by switching from env_logger::init() to try_init() while preserving the existing test filter when this helper initializes logging first.
Concerns
- No blocking correctness, security, or spec-alignment concerns found in the provided diff.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR makes the warp_editor render test logging helper idempotent by switching process-global logger setup from init() to try_init() while preserving the warp_editor=trace filter when this helper installs the logger.
Concerns
- No blocking correctness, security, or spec-alignment concerns found. The attached spec context states no approved or repository spec context was available for this PR.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
…3889) Closes warpdotdev#13853 ## Summary - Updated the `warp_editor` render test logging helper to use `try_init()` instead of `init()`. - Preserved the existing `warp_editor=trace` test filter when this helper wins logger initialization. - Ignored `SetLoggerError` when another test has already installed the process-global logger, removing the full-suite-only test-order failure. ## Validation - `./script/format` - `cargo test -p warp_editor` (478 passed) - `cargo clippy -p warp_editor --all-targets --all-features --tests -- -D warnings` - `cargo clippy --workspace --all-targets --all-features --tests -- -D warnings` was attempted, but failed on unrelated existing unused/dead-code errors in `app/src/terminal/*` and `app/src/lib.rs`. ## Notes - No approved spec context was supplied for this issue. Co-authored-by: Oz <[email protected]> Co-authored-by: Ben Navetta <[email protected]>
render/model/test_utils.rs called env_logger::...init() while content/find_tests.rs already called try_init(). Sharing one test binary, whichever lost the race panicked with SetLoggerError -- and because the guard is a parking_lot::Once, that panic poisoned it, cascading into 8 failures. `cargo test -p rift_editor --lib` was 419 passed / 8 failed before this and is 427 / 0 after. CI never caught it because nextest forks per test, but CLAUDE.md's own port-verification bar prescribes `cargo test -p <crate>`. Ported from warpdotdev/warp#13889. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…pdotdev#13889) Port upstream fix so render-test logging uses try_init() instead of init(), ignoring SetLoggerError when another test already installed the global logger. Removes full-suite-only test-order failures.
Closes #13853
Summary
warp_editorrender test logging helper to usetry_init()instead ofinit().warp_editor=tracetest filter when this helper wins logger initialization.SetLoggerErrorwhen another test has already installed the process-global logger, removing the full-suite-only test-order failure.Validation
./script/formatcargo test -p warp_editor(478 passed)cargo clippy -p warp_editor --all-targets --all-features --tests -- -D warningscargo clippy --workspace --all-targets --all-features --tests -- -D warningswas attempted, but failed on unrelated existing unused/dead-code errors inapp/src/terminal/*andapp/src/lib.rs.Notes