Repository navigation
Conversation
CanReader
left a comment
There was a problem hiding this comment.
The timeout itself is right, I tested it against a socket that accepts but never answers and the loop now retries instead of hanging. But I think the new test will break CI.
tests/test_cli_open_when_ready.pyimportsburr.cli.__main__, which callsrequire_pluginand needs loguru. CI installs.[tests,tracking-client,tracking-server,graphviz], and that doesn't include loguru. Locally with the same deps I getImportError: Missing plugin start!at collection, and since CI runspytest teststhis fails the whole job. Apytest.importorskip("loguru")before the import should be enough, or add thecliextra to the CI install.- The 3.9 job has a second problem:
_commandusesaddl_env: dict | None = Noneand there is nofrom __future__ import annotations, so importing the module on 3.9 raises a TypeError. This was already there but nothing imported the module in tests before.Optional[dict]fixes it (Optional is already imported). If #913 lands first and drops 3.9 this one goes away.
Small ones:
OPEN_WHEN_READY_TIMEOUT_SECONDSis right under the logging setup, so it looks like part of it. Maybe move it next toopen_when_ready.- The test only covers the happy path. A case where the first
requests.getraisesReadTimeoutand the retry works would test the actual bug.
|
Thanks for checking this. I reproduced the collection failure without loguru. 8237743 skips this optional CLI test module when loguru is absent, changes the existing annotation to Optional[dict] for Python 3.9, and places the timeout constant next to the readiness helper. I also added a ReadTimeout-then-success regression that verifies both requests receive the timeout, one retry sleep occurs, and the browser opens only after success. Both focused tests pass on Python 3.9 with the CLI dependencies installed; without loguru the module skips cleanly. Black, isort, Flake8, license-header and diff checks pass. Full CI is not verified: current head checks show labeling/mergeability success, with triage skipped. CI follow-up: the workflow-runs API reports Build Burr and Release Validation as action_required on this head, and documentation as startup_failure. No test jobs have run in those workflows. I have not changed the workflows or rerun them; the full CI result remains unverified. |
Summary
open_when_ready()so the readiness request stays boundedTests
python -m pytest tests/test_cli_open_when_ready.py -qpython -m py_compile burr/cli/__main__.py tests/test_cli_open_when_ready.pygit diff --check