UnresolvedEntry leaks to test runner in lazy-load retry runs
Nessuno ha ancora preso questa issue.
- Lingua principale
- Ruby
- Stelle
- 240
- Fork
- 36
- Merge medio
- 28m
- PR unite (30g)
- 3
Descrizione
In lazy-load mode, workers on a retry run can end up with resolve_entry returning an UnresolvedEntry instead of a live test object, crashing the test runner:
NoMethodError: undefined method `run' for an instance of CI::Queue::Redis::UnresolvedEntry
minitest/queue.rb:~167
Root cause
PR #380 introduced UnresolvedEntry as a defense-in-depth fallback for when resolve_entry finds neither @index nor entry_resolver set. The same PR added configure_lazy_queue to the eager-mode branch of populate_queue so non-leader workers get an entry_resolver.
The gap is in the retry join path. When a worker enters a retry run, it can skip populate_queue entirely -- going straight to the retry queue pop loop. configure_lazy_queue is never called in that path, so entry_resolver stays nil. The next test popped off the queue falls through to the UnresolvedEntry fallback. The runner then calls .run on it and crashes.
With many parallel workers this cascades: the unresolved entry is never acknowledged, gets requeued, and each worker that picks it up crashes the same way.
Conditions
- Lazy-load mode enabled
- Retry run (automatic retry is the most common trigger in CI environments)
- Non-leader worker (the leader goes through
populate_queueand getsentry_resolverset)
Fix direction
Call configure_lazy_queue in the retry join path, not just inside populate_queue. Mirrors the eager-mode fix from #380 for the initial run.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Leggi minitest/queue.rb intorno alla riga 167, quindi segui il percorso di join del retry e la chiamata esistente a configure_lazy_queue in populate_queue. Verifica che i worker non leader configurino un entry_resolver nelle esecuzioni di retry con lazy-load prima di estrarre i test, e verifica che il runner riceva un oggetto test attivo invece di un UnresolvedEntry.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- ruby
- Ambito
- testing-qa
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 65/100