Flaky unit test: TestReaderReconnector.test_reconnect_on_repeatable_error (timeout on 3.12)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- backend, testing-qa
Direzione di ricerca
Inizia da ydb/_topic_reader/topic_reader_asyncio_test.py::TestReaderReconnector::test_reconnect_on_repeatable_error e dall’implementazione di wait_for_fast/wait_condition in ydb/_topic_common/test_helpers.py:46-67. Riproduci il timeout con Python 3.12, quindi segui ReaderReconnector attraverso il percorso dell’errore ripetibile e quello del flusso sano, inclusa l’avvertenza di teardown. Il lavoro è completato quando il test termina in modo affidabile sotto il carico di CI senza mascherare il comportamento aumentando soltanto il timeout.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
ydb/_topic_reader/topic_reader_asyncio_test.py::TestReaderReconnector::test_reconnect_on_repeatable_error fails intermittently in CI with a timeout. Recurring flake — has been seen on several unrelated PRs.
Failure
ydb._topic_common.test_helpers.WaitConditionError: Bad condition in test
ydb/_topic_common/test_helpers.py:67: WaitConditionError
The test drives ReaderReconnector through one repeatable error (Overloaded) and then a healthy stream, and waits via:
await wait_for_fast(reconnector.wait_message()) # topic_reader_asyncio_test.py:1561
wait_for_fast → wait_condition budgets 1s wall / 1000 loop iterations (test_helpers.py:46-67). When reconnector.wait_message() does not resolve within that budget the helper raises WaitConditionError. So this is a timing-sensitive timeout, not an assertion about reconnect behavior.
A teardown side-effect also shows up after the failure (likely secondary, from the aborted coroutine):
PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object Queue.get ...>
RuntimeError: Event loop is closed
Environment / occurrence
- Observed on unit (3.12) only; unit 3.8–3.11, 3.13, 3.14 passed in the same run.
- Run: https://github.com/ydb-platform/ydb-python-sdk/actions/runs/28467229726/job/84370035632 (PR #849, whose diff is unrelated — touches
ydb/convert.pyresult-set rows). - Reproduces locally only occasionally; ~7s suite, fails at ~54% progress.
Hypothesis / directions to investigate
- The reconnect path (error stream → recreate → first message) occasionally needs more than the 1s / 1000-iteration budget under CI load, especially on 3.12's event-loop scheduling. Bumping the budget would only mask it.
- Worth checking whether
ReaderReconnectordoes extraawait asyncio.sleep(0)hops on the reconnect path on 3.12, or whether a backoff/retry delay leaks into the loop and eats the budget. - Confirm the
Event loop is closedteardown warning is purely secondary (GC of the parkedwait_forever/Queue.getcoroutine) and not contributing to the hang.
Workaround for now
Re-run the job; failure is intermittent and not a regression from the triggering PR.
- Lingua principale
- Python
- Stelle
- 102
- Fork
- 77
- Merge medio
- 2g 17h
- PR unite (30g)
- 11
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
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.
Altre issue di ydb-platform/ydb-python-sdk
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ydb-platform/ydb-python-sdk#290 ·
I maintainer di solito rispondono entro 1 giorno
-
bug: `ydb.aio.retry_operation` retains memory on exceptions chained from Pydantic validation errorsApertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
ydb-platform/ydb-python-sdk#905 ·
I maintainer di solito rispondono entro 1 giorno
-
dev: Forbid imports relativeApertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
ydb-platform/ydb-python-sdk#897 ·
I maintainer di solito rispondono entro 1 giorno
-
dev: improve codebase documentationForse già presa @Khabib73 l’ha presa 18 giorni fa. Apertaenhancement
ydb-platform/ydb-python-sdk#895 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
dev: Refactor legacyApertaenhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
ydb-platform/ydb-python-sdk#884 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ydb-platform/ydb-python-sdk
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-2 giorni Idoneità per principianti 70/100
-
FingerprintSplitter raises ZeroDivisionError when int(frac_train * len(dataset)) floors to zeroAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
lmstudio-ai/mlx-engine#376 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pyiron/bagofholding#166 ·