Repository navigation
fix(replays): Prevent Memory panel crashes from missing data - #131004
Conversation
📊 Type Coverage Diff✅ no issues found |
The memory chart now only receives frames whose usedJSHeapSize is a finite number, and MemoryFrame's type requires data, so the chart no longer needs its own guard. Frames like {memory: {}} previously passed the filter and charted undefined points.
Refs REPLAY-1047
Co-Authored-By: George Gritsouk <[email protected]>
gggritso
left a comment
There was a problem hiding this comment.
Should we maybe add some kind of UI warning that some memory frames were invalid? Is there precedent for that in the Replay UI and specifically in the Memory panel, or any other panels?
|
Re: a UI warning for invalid memory frames. I didn't find precedent for an "N frames were invalid" warning anywhere in the Replay UI:
So this PR keeps the existing pattern: drop the bad frames and log them. A partial-data warning could make sense, but it would be a new UX pattern across replay panels, and the crash has 1 event so far. I'd leave it for a follow-up if we want it. Your call. |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d6fe189. Configure here.
…ory-chart-undefined Co-Authored-By: George Gritsouk <[email protected]> # Conflicts: # static/app/utils/replays/hydrateSpans.tsx
Since #131408, a label event other than `Trigger: Override Selective Testing` starts an acceptance run where every job skips and the aggregator reports as `Acceptance (ignored label event)`. If that run is the newest acceptance run on a commit, the merge box keeps waiting for the required `Acceptance` check, even though an older run on the same commit passed. Re-running the older run doesn't help, because it is still not the newest run. This hits PRs where a person adds a label after the last push. The common case is Seer and bot PRs that need `Trigger: getsentry tests` added again after each push. #131004, reported by @gggritso, is one example: `Acceptance` passed twice on its head commit, the PR is approved, and it still shows as blocked. #131456 shows the same pattern. This change handles label events the way `backend.yml` already does: - They share the PR's concurrency group. - They run selective acceptance as usual. - They report `Acceptance`. The override label keeps working, because `skip_selective_testing` still reads the PR's labels. Trade-off: each manual label added to a PR now starts a selective acceptance run and cancels any run in progress, just like backend. #131408 used the ignored-label path to avoid that cost. Open question: the claim that the merge box only counts the newest run per workflow is inferred from the check and merge state of the PRs above, not from GitHub docs. Refs DI-2885 <!-- junior-request-attribution:start --> via @joshuarli. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3ACTJL7358X%3A1795105768.817939 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3ACTJL7358X%3A1795105768.817939) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3ACTJL7358X%3A1795105768.817939/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Joshua Li <[email protected]>
The Memory panel crashed with
Cannot read properties of undefined (reading 'usedJSHeapSize')when a recording had amemoryspan whosedataexisted but had nomemorykey. This PR adds some error-checking there.The SDK always sends
data.memory, and Relay recording scrubbing only rewrites strings, so the malformed span most likely came from client-side changes to the recording, such asbeforeAddRecordingEvent. That cause isn't confirmed.Fixes REPLAY-1047
Fixes JAVASCRIPT-3GBY
via George Gritsouk.
--
View Session [Sentry]