Skip to content

Formatting fixes - #412

Open
azarouski wants to merge 66 commits into
developfrom
formatting-fixes
Open

azarouski wants to merge 66 commits into
developfrom
formatting-fixes

Conversation

@azarouski

Copy link
Copy Markdown
Contributor

No description provided.

@azarouski azarouski self-assigned this Aug 16, 2026
azarouski and others added 25 commits August 17, 2026 01:53
Device containers in the devices and mac-devices roles now receive
STORAGE_TOKEN, so screenshot uploads and app-install blob fetches pass the
authenticated STF storage routes. The token is read from the environment to
keep the value out of this tracked repository, and it must match
STORAGE_TOKEN in the STF server variables.env.

DEVICE_VERSION moves to 3.0-hardening-2026.08 so providers run the
security-remediated device image that expects the token.
Updates the provider image reference and adds the new default values
needed by the updated STF image.
Honour the 'wireless' field that has existed in mcloud-devices.txt since
it was introduced but was never read (fields 2-10, 12 and 13 are read;
11 is skipped).

Motivation
----------
Apple TV 4K has no diagnostic port. 'ios listen' therefore never emits a
connect event for it, so create_containers() is never called and the
device cannot join the farm. The device is reachable over Apple's
RemoteXPC tunnel, but that tunnel needs uid 0 and a tun interface on the
host, so it lives outside the container set.

Everything else in the stack already works for such a device, because the
pieces that matter are HTTP and env driven:

  * the appium image builds appium:webDriverAgentUrl as
    http://${WDA_HOST}:${WDA_PORT} (files/zbr-default-caps-gen.sh)
  * the device image registers with STF as --serial ${DEVICE_UDID} from
    env, and health-checks WDA over HTTP
  * appium-xcuitest-driver explicitly supports running off macOS when
    given webDriverAgentUrl (assertWdaHostSessionCapsSupported)

So the only thing that genuinely differs is where WebDriverAgent lives.

Change
------
For rows with wireless=true:
  * skip the connector container -- it exists only to share usbmuxd
  * omit the --link to it from the device and appium containers
  * set WDA_HOST / WDA_PORT from two new device-list fields (14, 15)
  * pass WIRELESS=true to the device and appium containers, consumed by
    zebrunner/mcloud-device#210 and zebrunner/appium#439

Rows without wireless=true are untouched: same --link, same
WDA_HOST=connector, same connector container. Verified by simulation that
the docker arguments generated for a usb row are byte-identical.
WDA_PORT is now passed explicitly on the usb path too; both images
already default it to 8100, so that is a no-op.

Fails fast with an explicit message if wireless=true but no wda_host is
given, rather than starting containers that cannot work.

Notes
-----
Empty-array expansion uses ${arr[@]+"${arr[@]}"} because macOS ships
bash 3.2, where "${arr[@]}" on an empty array is an unbound-variable
error under 'set -u'.

No change is needed in listen()/on-usb-update: 'start <udid>' already
exists as a CLI verb, so an external owner of the tunnel can start and
stop these devices directly.

Verified end to end on an Apple TV 4K (AppleTV14,1) on tvOS 18.4 and
26.6: a Linux container with no Xcode, no macOS and no tunnel access
created an Appium session and drove the device (page source, screenshot,
button press, active app).
Support wireless (portless) iOS/tvOS devices by honouring the existing 'wireless' field
values for "wireless" were changed to lowercase
Change the way sudo permissions provided for ansible
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.

3 participants