Commit df89359
feat(test): add
It's hard to determine when a known flaky Jest test is no longer flaky.
You basically just have to keep running it repeatedly. But it takes a
_long_ time (and bogs up our GHA workflows) to re-run all tests too.
This PR adds plumbing that lets us specifically re-run known flaky tests
50x in a single run:
1. I added an opt-in
https://github.com/getsentry/sentry/labels/Frontend%3A%20Rerun%20Flaky%20Tests
label as seen on this PR
2. When that label is present, the frontend workflow sets a
`RERUN_KNOWN_FLAKY_TESTS` process env var
3. Tests defined with the new `it.isKnownFlake` will define the same
test 50x with incremented counter names when that var is present
[Example CI failure (search `flaky
rerun`)](https://github.com/getsentry/sentry/actions/runs/23800263946/job/69358610839?pr=111860):
```plaintext
● EventGroupingInfo › [flaky rerun x50] fetches and renders grouping info for errors › run 2/50
```
I added it to the following tests that have failed >=2x on `master` over
the last month:
| File | Test | CI failures (30d) | Ticket |
|------|------|-------------------|--------|
| `eventReplay/index.spec.tsx` | render replay inline onboarding | 6 |
[REPLAY-879](https://linear.app/getsentry/issue/REPLAY-879) |
| `stackTrace.spec.tsx` | URL link in tooltip | 5 |
[ENG-7192](https://linear.app/getsentry/issue/ENG-7192) |
| `resultsSearchQueryBuilder.spec.tsx` | has: dropdown + normal tags (2
tests) | 5 | [ENG-7201](https://linear.app/getsentry/issue/ENG-7201) |
| `metricsTab.spec.tsx` | toggle query builder sidebar | 4 |
[ENG-7202](https://linear.app/getsentry/issue/ENG-7202) |
| `customerDetails.spec.tsx` | disabled without billing.admin | 4 |
[ENG-7203](https://linear.app/getsentry/issue/ENG-7203) |
| `eventsSearchBar.spec.tsx` | has: dropdown | 3 |
[DAIN-1271](https://linear.app/getsentry/issue/DAIN-1271) |
| `trace.spec.tsx` | arrowup+shift scroll (was `it.skip`) | 3 |
[BROWSE-411](https://linear.app/getsentry/issue/BROWSE-411) |
| `allMonitors.spec.tsx` | select all query results | 2 |
[ENG-7204](https://linear.app/getsentry/issue/ENG-7204) |
| `spansSearchBar.spec.tsx` | onSearch correct query | 2 |
[ENG-7205](https://linear.app/getsentry/issue/ENG-7205) |
| `react-native/metrics.spec.tsx` | onboarding content | 2 |
[ENG-7206](https://linear.app/getsentry/issue/ENG-7206) |
| `useReplaysFromIssue.spec.tsx` | fetch replay ids | 2 |
[ENG-7207](https://linear.app/getsentry/issue/ENG-7207) |
| `spanEvidencePreview.spec.tsx` | error on request fail | 2 |
[ENG-7208](https://linear.app/getsentry/issue/ENG-7208) |
| `groupingInfoSection.spec.tsx` | render grouping info | 2 |
[ENG-7209](https://linear.app/getsentry/issue/ENG-7209) |
| `timeSince.spec.tsx` | respects timezone in tooltip | 1 |
[ENG-7211](https://linear.app/getsentry/issue/ENG-7211) |
| `versionHoverCard.spec.tsx` | renders | 1 |
[ENG-7212](https://linear.app/getsentry/issue/ENG-7212) |
Made with [Cursor](https://cursor.com)
---------
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>it.isKnownFlake for opt-in stress-testing flaky Jest fixes (#111860)1 parent d5c1cfe commit df89359
File tree
17 files changed
+174
-118
lines changed- .github/workflows
- static
- app
- components
- events/eventReplay
- groupPreviewTooltip
- stackTrace
- gettingStartedDocs/react-native
- views
- dashboards/widgetBuilder/buildSteps/filterResultsStep
- detectors/list
- discover/results
- explore/metrics
- issueDetails/groupReplays
- gsAdmin/views
- tests/js
- sentry-test
17 files changed
+174
-118
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
824 | 824 | | |
825 | 825 | | |
826 | 826 | | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
827 | 831 | | |
828 | 832 | | |
829 | 833 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
148 | 151 | | |
149 | 152 | | |
150 | 153 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
880 | | - | |
| 880 | + | |
881 | 881 | | |
882 | 882 | | |
883 | 883 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments