Flaky: Redis cache prefix span includes unprefixed random byte key

オープン
#8,033 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python, redis

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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]

主要言語
Python
スター
2.2k
フォーク
713
平均マージ
1日 16分
マージ済み PR(30日)
113

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/sentry-python のほかの issue

getsentry/sentry-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。