test: clear remaining stale flaky markers and fix banner test isolation - #120851
Closed
JoshuaKGoldberg wants to merge 7 commits into
Closed
test: clear remaining stale flaky markers and fix banner test isolation#120851JoshuaKGoldberg wants to merge 7 commits into
JoshuaKGoldberg wants to merge 7 commits into
Conversation
usePrefetchTraceItemDetailsOnHover scheduled a trace-item prefetch on hover start and cleared it only on hover end, so a row that unmounted while its timer was pending still fired the request. In the app that is a wasted fetch after the table is gone; in Jest the timer outlives test cleanup and lands in a later test, which fails on an unmocked /trace-items/{id}/ request.
The hook now tracks the timer it scheduled and clears it on unmount, only releasing the shared ref when the pending timer is its own so an unmounting row cannot cancel a sibling's prefetch. This also drops the trace-item mocks added to logsInfiniteTable.spec.tsx to absorb the leaked requests.
Refs LOGS-936
All seven it.isKnownFlake() markers in this file came from one automated batch on 2026-06-03, generated from CI data collected before the underlying failures were fixed on 2026-05-28 by #116374, #116405, and #114893. The automation never revisits markers, so they have sat here for two months. Every CI issue Sentry recorded for this file is resolved, and the only event in the last 90 days came from an experimental React-compiler branch rather than master. Local runs are clean: 1436 executions under the 50x stress harness, including four concurrent runs to force CPU contention, plus simulated response latency up to 500ms. The marker is a no-op in normal CI, expanding to 50 runs only when the Frontend: Rerun Flaky Tests label sets RERUN_KNOWN_FLAKY_TESTS. Removing it changes no default CI behavior; it stops advertising these tests as flaky. Refs LOGS-936
Removes the 31 remaining it.isKnownFlake() markers and fixes the one test that is genuinely broken. anomalyDetectionFeedbackBanner's 'submits anomaly detection feedback (yes)' fails 49 of 50 stressed runs. The banner records dismissal in localStorage keyed by incident id via useDismissable, and jsdom keeps that store for the whole file, so only the first run sees a banner to click. The sibling test passes only because it uses a different incident id. Clearing localStorage in beforeEach makes it repeatable: 51/51 stressed, previously 1/50. The other 30 markers are stale. All date to automation batches merged on 2026-05-26, 06-03, and 06-08; the automation only ever adds markers, and its last three PRs (#117642, #118116, #118627) were closed unmerged, so nothing has marked or unmarked anything on master in seven weeks. Eleven of the nineteen files have had no commit since their marker landed. Every marked test passes in isolation, and 37 of 38 passed 50x stress across two full passes (3928 executions). None of the nineteen files appears among the 49 jest issues currently unresolved in Sentry, while many unmarked files do. Refs LOGS-936
Contributor
Sentry Snapshot Testing
|
…ogs-table-row-tests
…-tests' into joshgoldberg/logs-936-clear-remaining-stale-flaky-markers
Base automatically changed from
joshgoldberg/logs-936-unmark-stale-flaky-logs-table-row-tests
to
master
July 31, 2026 16:04
This was referenced Aug 4, 2026
Member
Author
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.
I audited every remaining
it.isKnownFlake()marker in the repo. The only remaining flake I could find was thatanomalyDetectionFeedbackBanner.spec.tsx→submits anomaly detection feedback (yes)fails after its first run because it keys its dismissal inlocalStorage. This PR clears that between runs.Otherwise, this just removes all the
it.isKnownFlake(). 🤘Follow-up to a follow-up on LOGS-936