Conversation
…che pollution
The buffer fixture was calling `use_redis_cluster("default")` which
cached a Redis Cluster client under the "default" key in
`RedisClusterManager._clusters_bytes`. After the context manager exited,
this cached client persisted and was returned to subsequent tests that
called `redis_clusters.get_binary("default")`, causing them to connect
to the Redis Cluster instead of standalone Redis.
Use a distinct cluster name ("span-buffer") with a matching
`SENTRY_SPAN_BUFFER_CLUSTER` setting override to isolate the cache entry.
Fixes #108973
rbro112
approved these changes
Feb 25, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
bufferfixture intests/sentry/spans/test_buffer.pywas callinguse_redis_cluster("default"), which cached a Redis Cluster client under the"default"key inRedisClusterManager._clusters_bytes.redis_clusters.get_binary("default"), causing them to use the Redis Cluster instead of standalone Redis."span-buffer") with a matchingSENTRY_SPAN_BUFFER_CLUSTERsetting override to isolate the cache entry.Fixes #108973
Test plan
test_delete_countdevservices up --mode backend-ci)