codingjoe / codingjoe/threadmill

Uncovered pre-existing branches in the Redis backend

Đang mở Phù hợp với người mới
#52 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
12
Fork
1
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
10

Mô tả

Found by `testJoe` while adding coverage for the fair multi-queue rotation (`codingjoe-fair-multi-queue-scheduling`), and confirmed pre-existing (untouched by that diff):

`defer: pre-existing uncovered lines threadmill/backends/redis.py L147-148, L445, L494-495. Unrelated to this diff. [threadmill/backends/redis.py]`

The four lines are:

- `L147-148` — the `ValueError` raised when `REDIS_URL` is missing from the backend params.
- `L445` — `raise TaskResultDoesNotExist(...)` in `get_result()`.
- `L494-495` — the `except ValueError: continue` that drops malformed pub/sub payloads in `worker_telemetry()`.

None are reachable from the current test suite, so `uv run pytest` reports them as missing. Add direct tests (a backend without `REDIS_URL`, an unknown result id, a malformed telemetry message) or delete the branches that no caller can reach.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start in threadmill/backends/redis.py at lines 147-148, 445, and 494-495, then inspect the existing Redis backend tests. Run `uv run pytest` to confirm the uncovered branches, and add direct coverage for missing REDIS_URL, an unknown result id, and malformed telemetry; done means the tests pass without those lines remaining uncovered.

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

Đánh giá

Công nghệ
python, redis
Lĩnh vực
backend, databases, testing
Loại issue
Tái cấu trúc
Độ khó
2/5
Thời gian dự kiến
Nửa ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
84/100

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.