optics --version failed outright on a clean ubuntu:24.04:
ImportError: libxcb.so.1: cannot open shared object file: No such file or directory
#577 fixes it by depending on opencv-python-headless, but nothing in the test suite would catch a regression. The unit tests all run in an environment that already has the system libraries, so the dependency could be switched back — or another dependency could grow a native link — and CI would stay green while every Docker and CI user is broken on first command.
The bug was found by running the CLI in a container by hand. That check should not depend on someone thinking to do it again.
Suggested
A smoke job that installs the built wheel into a bare image and runs the CLI:
- run: docker run --rm -v "$PWD/dist:/wheels:ro" ubuntu:24.04 sh -c '
apt-get update -qq && apt-get install -y -qq python3 python3-venv &&
python3 -m venv /v && /v/bin/pip install -q /wheels/*.whl &&
/v/bin/optics --version && /v/bin/optics list > /dev/null'
No apt-get install of graphics libraries — that absence is the assertion.
Worth running on python:3.12-slim too, which is what most projects actually base on.
optics --versionfailed outright on a cleanubuntu:24.04:#577 fixes it by depending on
opencv-python-headless, but nothing in the test suite would catch a regression. The unit tests all run in an environment that already has the system libraries, so the dependency could be switched back — or another dependency could grow a native link — and CI would stay green while every Docker and CI user is broken on first command.The bug was found by running the CLI in a container by hand. That check should not depend on someone thinking to do it again.
Suggested
A smoke job that installs the built wheel into a bare image and runs the CLI:
No
apt-get installof graphics libraries — that absence is the assertion.Worth running on
python:3.12-slimtoo, which is what most projects actually base on.