Skip to content

fix(redis): Support list types in RedisBuffer serialization - #123705

Draft
sentry[bot] wants to merge 2 commits into
masterfrom
seer/fix-redis-buffer-list-type
Draft

fix(redis): Support list types in RedisBuffer serialization#123705
sentry[bot] wants to merge 2 commits into
masterfrom
seer/fix-redis-buffer-list-type

Conversation

@sentry

@sentry sentry Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

This PR addresses a TypeError: <class 'list'> occurring in sentry.tasks.store.save_event when RedisBuffer._dump_value attempts to serialize Group.data.

The root cause was that RedisBuffer._dump_value did not have a specific branch to handle Python list types. This became problematic when Group.data.metadata.seer_similarity.results (which is a list of dicts from Seer) was encountered during serialization, causing the else branch to raise a TypeError.

This fix introduces elif isinstance(value, list) branches in both _dump_value and _load_value to correctly serialize and deserialize list types, mirroring the existing dict handling. Additionally, the return type annotation for _load_values was updated to include list[Any] to resolve a mypy error.

New test cases have been added to test_dump_and_load_value to cover both flat lists and lists of dictionaries, ensuring the new serialization logic works as expected.

Fixes SENTRY-5SD4

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.

Fixes SENTRY-5SD4

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants