Flaky: Redis cache prefix span includes unprefixed random byte key

Đang mở
#8,033 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, redis
Lĩnh vực
observability, testing

Hướng nghiên cứu

Start with test_cache_prefixes in tests/integrations/redis/test_redis_cache_module.py, around line 421, where the failing assertion is. Run that parametrized test many times to reproduce the flake, then check how the Redis cache span name is built from mget keys, including whether random bytes from uuid.uuid4().bytes get decoded or rendered. Done means the root cause is established (SDK filtering or test nondeterminism) and the test passes reliably.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

flaky-test

Test

tests/integrations/redis/test_redis_cache_module.py::test_cache_prefixes[True]

CI evidence

Failed once on master commit cc90b4db0935668848204d377f27d2bec3400950 in job 115277595744. The failing environment was py3.7-redis-v4.6.0 (Python 3.7.17, redis-py 4.6.0, fakeredis 2.25.1; Redis server not used). Assertion excerpt: assert "=i%lۅKާ}b_;-'2, yes" == ', yes' at test_redis_cache_module.py:421.

Expected vs actual

With cache_prefixes=["yes"], a cache span should contain only matching cache keys, so the expected span name is ", yes". In this failure the unprefixed random-byte key was rendered into the span name.

Suspected trigger (unverified)

The test passes uuid.uuid4().bytes to mget; the SDK may decode or otherwise render random bytes as text while building the cache span name/description. Need to establish whether this is an SDK serialization/filtering bug or a test relying on a nondeterministic key.

Environment

  • CI Python: 3.7.17
  • redis-py: 4.6.0
  • fakeredis: 2.25.1
  • Tox env: py3.7-redis-v4.6.0
  • Redis server: not required by this test (it uses fakeredis.FakeStrictRedis).

The weekly report records one failure. Baseline repetition, measured reproduction, and root cause are pending.

via johdax.

--

View Junior Session [Sentry]

Ngôn ngữ chính
Python
Star
2.2k
Fork
713
Merge trung bình
1 ngày 16 phút
Pull request đã merge (30 ngày)
113

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/sentry-python

Tất cả issue của getsentry/sentry-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.