fix(explore): guard against disposed ECharts instance in release bubbles mouse handlers#119457
Draft
billyvg wants to merge 2 commits into
Draft
fix(explore): guard against disposed ECharts instance in release bubbles mouse handlers#119457billyvg wants to merge 2 commits into
billyvg wants to merge 2 commits into
Conversation
…ported dataset
When a user POSTs to /api/0/organizations/{org}/alert-rules/ with
`dataset=sessions` (or any dataset not in `query_datasets_to_type`),
the lookup `query_datasets_to_type[dataset]` raises a KeyError that
bubbles up as an unhandled 500. Add an explicit ValidationError before
the dict lookup so callers get a well-formed 400 with a helpful message
listing the valid datasets.
Fixes SENTRY-5PEF
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LjN9gb92hUE6jTqQ9dkjAm
…les mouse handlers
When a user hovers over a release bubble and the component unmounts
before the mouseout fires (e.g. navigation), the ECharts instance can
be disposed while the event handler is still mid-execution. Calling
`setOption` on a disposed instance causes an internal ECharts crash
("Cannot read properties of undefined (reading 'get')") deep in
MarkerModel.mergeOption.
Add `isDisposed()` guards to `handleMouseOver` and `handleMouseOut`
so we bail out early if the instance has already been cleaned up.
Fixes JAVASCRIPT-3AP8
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LjN9gb92hUE6jTqQ9dkjAm
Contributor
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
Contributor
Backend Test FailuresFailures on
|
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.
Summary
Fixes JAVASCRIPT-3AP8 —
TypeError: Cannot read properties of undefined (reading 'get')inuseReleaseBubbles.tsxRoot cause: When a user hovers over a release bubble and then navigates away (or the component unmounts) before the
mouseoutevent fires, the ECharts instance can be disposed whilehandleMouseOutis still executing. CallingsetOptionon a disposed ECharts instance triggers an internal crash deep inMarkerModel.mergeOption→GlobalModel.eachSeries, whereseriesModelisundefined.The same disposal race can affect
handleMouseOver.Fix: Add
echartsInstance.isDisposed()early-return guards to bothhandleMouseOverandhandleMouseOut. This pattern is already used elsewhere in the codebase (seeuseChartBoxZoom.tsx:123).Evidence:
useReleaseBubbles.tsx:552→echartsInstance.setOption→MarkerModel.mergeOption→seriesModel.get(...)whereseriesModelisundefinedTest plan
/issues/:groupId/events/page with the release bubbles chart, hover over a bubble, and quickly navigate away — verify no TypeError in the consoleuseReleaseBubblescontinue to passClaude session: https://claude.ai/code/session_01LjN9gb92hUE6jTqQ9dkjAm
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
Generated by Claude Code