codingjoe / codingjoe/threadmill

Uncovered pre-existing branches in the Redis backend

Aperta Adatta ai principianti
#52 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
12
Fork
1
Merge medio
1g 1h
PR unite (30g)
10

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, redis
Ambito
backend, databases, testing
Tipo di issue
Refactoring
Difficoltà
2/5
Tempo stimato
Mezza giornata
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
84/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.