Skip to content

ci(testflows): drop host ffmpeg install, use opencv-python-headless - #960

Merged
Slach merged 1 commit into
masterfrom
ci/drop-host-ffmpeg
Nov 3, 2026
Merged

Slach merged 1 commit into
masterfrom
ci/drop-host-ffmpeg

Conversation

@Slach

@Slach Slach commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Why

Testflows jobs occasionally hang for 30-40 minutes in tests/testflows/infra/setup.sh on
apt-get install ffmpeg libsm6 libxext6. The ffmpeg dependency tree (~90 MB) sometimes downloads
from azure.archive.ubuntu.com at ~40 kB/s:

  • run 40400570908, latest / functions: Fetched 85.4 MB in 38min 10s (37.3 kB/s)
  • run 40351239613, fixed / functions: Fetched 91.5 MB in 29min 21s (52.0 kB/s)

The host ffmpeg is never used. Session video is recorded by the selenium/video:ffmpeg-8.1-*
sidecar container (se:recordVideo + video-image in infra/config.toml), which has its own ffmpeg.
The files only get copied out via the tmp/target mount.

Changes

  • setup.sh: remove the second apt-get update and the apt-get install ffmpeg libsm6 libxext6.
  • requirements.txt: opencv-python -> opencv-python-headless (same 4.9.0.80). The headless
    build has no X11 runtime deps, so libsm6/libxext6 are not needed. cv2 is only used for
    contour detection in steps/actions.py::check_screenshot (no GUI calls).

Local verification

  • functions suite on Grafana latest: 13/13 scenarios OK. video.mp4 was still recorded in tmp/target.
  • data_source_setup_connections (the suite that exercises check_screenshot / cv2): see the comment below.

🤖 Generated with Claude Code

Host ffmpeg is never invoked: session video is recorded by the
selenium/video sidecar container with its own ffmpeg. The ~90 MB apt
install of ffmpeg occasionally crawls at ~40 kB/s on Azure mirrors and
stalls jobs for 30-40 minutes.

opencv-python-headless has no X11 runtime deps, so libsm6/libxext6 are
no longer needed either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Slach

Slach commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

Local verification on Grafana latest (macOS + OrbStack, SKIP_BUILDERS=1), with cv2 loaded from opencv-python-headless==4.9.0.80 (checked via cv2.__file__):

  • data_source_setup_connections: this is the suite that calls actions.check_screenshot → cv2.cvtColor/inRange/findContours/minAreaRect/boxPoints. 19/19 scenarios OK, 8m27s, 9 checking screenshot steps passed. The only errored attempt is the usual first retry of wait for grafana to be started.
  • functions: 13/13 scenarios OK. video.mp4 was recorded by the selenium/video sidecar.

@Slach
Slach merged commit 6b8cca9 into master Nov 3, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant