test(e2e): Restore iOS replay assertion in captureReplay test - #6683
Open
antonis wants to merge 1 commit into
Open
test(e2e): Restore iOS replay assertion in captureReplay test#6683antonis wants to merge 1 commit into
antonis wants to merge 1 commit into
Conversation
Re-adds the assertReplay.yml check removed in #6072. That assertion was flaky because buffer-mode replay (replaysOnErrorSampleRate) only attaches a replay_id to the error event if the native replay buffer captured a frame before the error fired; on slow CI the exception was captured while the buffer was still empty, so the event was sent permanently without a replay_id and no server-side retry could recover it. Make the test deterministic by priming the buffer before capturing the exception: a new side-effect-free "Replay Ping" counter in the e2e harness is tapped repeatedly to mutate the view hierarchy so the native capture records frames first. iOS only, matching the assertion scope (Android does not reliably capture replays in CI, see #4277). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
|
Contributor
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 57e0069+dirty | 413.82 ms | 453.47 ms | 39.65 ms |
| eb93136+dirty | 416.18 ms | 467.32 ms | 51.14 ms |
| 9210ae6+dirty | 475.41 ms | 525.24 ms | 49.84 ms |
| 94af3bd+dirty | 503.48 ms | 542.37 ms | 38.89 ms |
| 15d4514+dirty | 406.77 ms | 428.06 ms | 21.29 ms |
| 5fe1c6c+dirty | 401.62 ms | 445.28 ms | 43.66 ms |
| 0d9949d+dirty | 403.57 ms | 437.00 ms | 33.43 ms |
| 7887847+dirty | 416.61 ms | 462.04 ms | 45.43 ms |
| 100ce80+dirty | 463.66 ms | 539.56 ms | 75.90 ms |
| a3265b6+dirty | 406.86 ms | 449.84 ms | 42.98 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 57e0069+dirty | 49.74 MiB | 54.85 MiB | 5.11 MiB |
| eb93136+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
| 9210ae6+dirty | 48.30 MiB | 53.54 MiB | 5.23 MiB |
| 94af3bd+dirty | 48.30 MiB | 53.57 MiB | 5.26 MiB |
| 15d4514+dirty | 48.30 MiB | 53.60 MiB | 5.30 MiB |
| 5fe1c6c+dirty | 43.75 MiB | 48.14 MiB | 4.39 MiB |
| 0d9949d+dirty | 43.75 MiB | 48.13 MiB | 4.37 MiB |
| 7887847+dirty | 49.74 MiB | 54.81 MiB | 5.07 MiB |
| 100ce80+dirty | 48.30 MiB | 53.46 MiB | 5.15 MiB |
| a3265b6+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
Contributor
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 61cc206+dirty | 3849.70 ms | 1230.33 ms | -2619.38 ms |
| 5a21b51+dirty | 3823.11 ms | 1214.46 ms | -2608.65 ms |
| 038a6d7+dirty | 3849.69 ms | 1228.40 ms | -2621.28 ms |
| 3817909+dirty | 1183.90 ms | 1187.50 ms | 3.60 ms |
| d7d54c6+dirty | 3827.13 ms | 1217.18 ms | -2609.95 ms |
| 0bd8916+dirty | 3842.33 ms | 1230.76 ms | -2611.58 ms |
| a0d8cf8+dirty | 3842.33 ms | 1212.40 ms | -2629.93 ms |
| af33f3b+dirty | 3849.98 ms | 1236.45 ms | -2613.53 ms |
| 5a316ea+dirty | 3820.11 ms | 1211.28 ms | -2608.83 ms |
| 7a89652+dirty | 3861.46 ms | 1229.61 ms | -2631.85 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 61cc206+dirty | 4.98 MiB | 6.55 MiB | 1.57 MiB |
| 5a21b51+dirty | 5.15 MiB | 6.67 MiB | 1.51 MiB |
| 038a6d7+dirty | 5.15 MiB | 6.70 MiB | 1.55 MiB |
| 3817909+dirty | 3.38 MiB | 4.73 MiB | 1.35 MiB |
| d7d54c6+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| 0bd8916+dirty | 5.15 MiB | 6.69 MiB | 1.53 MiB |
| a0d8cf8+dirty | 5.15 MiB | 6.67 MiB | 1.51 MiB |
| af33f3b+dirty | 4.98 MiB | 6.51 MiB | 1.54 MiB |
| 5a316ea+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| 7a89652+dirty | 5.15 MiB | 6.70 MiB | 1.55 MiB |
Contributor
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3b6e9f9+dirty | 3822.77 ms | 1208.00 ms | -2614.77 ms |
| 5a23c47+dirty | 3843.54 ms | 1226.05 ms | -2617.50 ms |
| 100ce80+dirty | 3843.57 ms | 1226.46 ms | -2617.12 ms |
| 0bd8916+dirty | 3816.17 ms | 1215.05 ms | -2601.12 ms |
| a0d8cf8+dirty | 3826.15 ms | 1213.12 ms | -2613.03 ms |
| 0a9e622+dirty | 3825.35 ms | 1219.04 ms | -2606.31 ms |
| 21a1e70+dirty | 3826.22 ms | 1217.74 ms | -2608.47 ms |
| 9ad4522+dirty | 3862.28 ms | 1226.27 ms | -2636.01 ms |
| 88735e9+dirty | 3837.80 ms | 1216.39 ms | -2621.41 ms |
| d0e3b3e+dirty | 3846.64 ms | 1226.27 ms | -2620.38 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3b6e9f9+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| 5a23c47+dirty | 4.98 MiB | 6.46 MiB | 1.49 MiB |
| 100ce80+dirty | 5.15 MiB | 6.67 MiB | 1.51 MiB |
| 0bd8916+dirty | 5.15 MiB | 6.69 MiB | 1.53 MiB |
| a0d8cf8+dirty | 5.15 MiB | 6.67 MiB | 1.51 MiB |
| 0a9e622+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| 21a1e70+dirty | 4.98 MiB | 6.46 MiB | 1.49 MiB |
| 9ad4522+dirty | 4.98 MiB | 6.56 MiB | 1.58 MiB |
| 88735e9+dirty | 4.98 MiB | 6.46 MiB | 1.49 MiB |
| d0e3b3e+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
Contributor
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| eb93136+dirty | 500.37 ms | 532.58 ms | 32.21 ms |
| 9210ae6+dirty | 444.14 ms | 459.80 ms | 15.66 ms |
| 94af3bd+dirty | 413.04 ms | 451.76 ms | 38.71 ms |
| 7d6fd3a+dirty | 435.06 ms | 458.78 ms | 23.72 ms |
| 15d4514+dirty | 413.63 ms | 449.62 ms | 35.99 ms |
| 9ad4522+dirty | 432.43 ms | 450.91 ms | 18.49 ms |
| 0a147b2+dirty | 442.80 ms | 522.24 ms | 79.44 ms |
| 7887847+dirty | 420.47 ms | 460.55 ms | 40.08 ms |
| a3265b6+dirty | 410.96 ms | 444.76 ms | 33.80 ms |
| 57e0069+dirty | 442.25 ms | 486.64 ms | 44.39 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| eb93136+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
| 9210ae6+dirty | 48.30 MiB | 53.54 MiB | 5.23 MiB |
| 94af3bd+dirty | 48.30 MiB | 53.57 MiB | 5.26 MiB |
| 7d6fd3a+dirty | 43.94 MiB | 49.00 MiB | 5.06 MiB |
| 15d4514+dirty | 48.30 MiB | 53.60 MiB | 5.30 MiB |
| 9ad4522+dirty | 49.74 MiB | 55.38 MiB | 5.63 MiB |
| 0a147b2+dirty | 49.74 MiB | 55.08 MiB | 5.34 MiB |
| 7887847+dirty | 49.74 MiB | 54.81 MiB | 5.07 MiB |
| a3265b6+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
| 57e0069+dirty | 49.74 MiB | 54.85 MiB | 5.11 MiB |
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.
📢 Type of change
📜 Description
Re-adds the
assertReplay.ymliOS check to thecaptureReplaye2e test, removed in #6072, and makes it deterministic instead of flaky.The assertion was flaky for a structural reason, not CI noise: buffer-mode replay (
replaysOnErrorSampleRate) only attaches areplay_idto the error event if the native replay buffer captured at least one frame before the error fired. On slow CI the exception was captured while the buffer was still empty, so the event was sent permanently without areplay_id— and no server-side retry could recover it (sentryApi.jsalready retries non-200s for ~10 min, so replay processing lag was never the real problem).Changes:
src/EndToEndTests.tsx— add a side-effect-freeReplay Pingcounter (testID='replayPing') that mutates the view hierarchy without sending any events.maestro/utils/primeReplayBuffer.yml(new) — tapreplayPing8× to churn the view (and spend a few seconds while Maestro re-reads the UI between taps) so the native capture records frames before the exception.maestro/utils/assertReplay.yml— restored verbatim from before fix(e2e): Remove flaky iOS replay assertion from captureReplay test #6072 (assertsreplay_id, duration, segments,ftypmp42codec via the Sentry API).maestro/captureReplay.yml— run the prime step, then re-wireassertReplay.yml, both gatedplatform: iOS.dist/is gitignored and rebuilt bycli.mjson create, so the harness change flows into CI automatically.💡 Motivation and Context
Closes #6082.
💚 How did you test it?
CI
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
#6684