Skip to content

feat: doctor, next steps of the setup and the device selection of zebrunner-farm - #459

Open
azarouski wants to merge 5 commits into
developfrom
feat/setup-doctor-farm-ux
Open

azarouski wants to merge 5 commits into
developfrom
feat/setup-doctor-farm-ux

Conversation

@azarouski

@azarouski azarouski commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor
  • ./zebrunner.sh doctor: host, settings, deployment (zebrunner-farm / containers rendered with other settings), network to MCloud (endpoints, NAT hairpin of STF_PROVIDER_HOST with the LAN address to use, AGENT_HOSTS of stf-proxy via 403/401), devices (refused grid registration, refused CURVE key). Never prints secrets, exits 1 on a problem. Network probes in patch/netcheck.py (stdlib Python).
  • ./zebrunner.sh setup ends with numbered next steps (lists the host addresses for STF_PROVIDER_HOST).
  • ./zebrunner.sh curve-key prints the STF_ZMQ_CURVE_CLIENT_KEY_<HOST>=<key> line for mcloud (feat(zmq): allow one client key per STF_ZMQ_CURVE_CLIENT_KEY_<HOST> variable stf#1114, feat(curve): one STF_ZMQ_CURVE_CLIENT_KEY_<HOST> variable per device host mcloud#276).
  • ./zebrunner.sh ansible lists the running device containers and offers to remove them first [Y/n].
  • zebrunner-farm: several devices, groups (ios, android, usb, wireless, ...), patterns, -x/--exclude, -q; in a terminal a numbered list with container states and the question run / cancel / filter (f) / exclude (x); udev, launchd and scripts are never asked. One line per container: running, started, created <id> or the docker error; restart is per device.

Found on a LAN setup (agent registering with its public IP, hub in the same LAN without hairpin); related: zebrunner/appium#472.

Tests: make lint, make test on macOS; tests/run_all.sh on Ubuntu (incl. the flock lock); doctor and the new zebrunner-farm tried on a real agent.

Follow-up commits

make lint, make test (macOS) and make docker (Linux image) pass.

azarouski and others added 5 commits November 9, 2026 14:05
…runner-farm

- ./zebrunner.sh doctor checks the host, the settings, the deployment, the network to the MCloud server (the NAT
  hairpin of STF_PROVIDER_HOST, AGENT_HOSTS of stf-proxy) and the devices, and tells what to fix
- the setup ends with the numbered next steps, curve-key prints the STF_ZMQ_CURVE_CLIENT_KEY_<HOST> line of mcloud
- ansible offers to remove the running containers of the devices before the deploy
- zebrunner-farm: several devices, groups and patterns, -x to exclude, the list and the question in a terminal
  (filter, exclude, run, cancel), -q; one line per container: running, started, created or the error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s of the devices

- zebrunner-farm restart --batch (default: all the containers removed, then created) or --rolling (device by
  device), s of the question switches it
- REMOTE_CONNECT_HOST goes to the STF containers (adb connect through the adb relay of mcloud), doctor checks the relay
  on the ports of the devices and prints the ADB_RELAY_HOSTS entry of the host
- proxy_port and server_proxy_port of the devices are dropped: not in mcloud-devices.txt, not passed to appium; doctor
  reads the list of the earlier format too

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…db relay

The relay forwards min_port + 1 of every Android device only: min_port is the screen, it has no login of its own.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…d device

- connect_port of a device (optional, Android): STF_PROVIDER_CONNECT_PORT of its STF container (zebrunner/stf fixed
  connect port), published when it is out of min_port-max_port, validated with the other host ports; appium gets it as
  ADB_PORT
- adb_port is no longer obligatory: unused on Linux, the host port of a USB Android device on macOS
- mcloud-devices.txt: connect_port is the 15th field
- doctor: the remote debug ports from connect_port (min_port + 1 without it), ADB_RELAY=true of mcloud as the fix

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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