codingjoe / codingjoe/threadmill

Uncovered pre-existing branches in the Redis backend

Open Beginner friendly
#52 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
12
Forks
1
Avg merge
1d 1h
Merged PRs (30d)
10

Description

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.

Contributor guide

Open the contributing guide

Research direction

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.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, redis
Domain
backend, databases, testing
Issue type
Refactor
Difficulty
2/5
Estimated time
Half a day
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.