Repository navigation
fix: skip local adb device check for remote Appium servers - #541
chinmayajha wants to merge 3 commits into
Conversation
Documentation preview
Updated automatically when the docs build succeeds; removed when the PR is closed. |
32fe390 to
fcb9d78
Compare
The Android preflight in `optics execute` always ran `adb devices` on the local machine, even when the configured Appium `url` pointed at a remote server or device hub with its own devices attached. That made the check unconditionally fail with "No Android device/emulator attached" for any non-local Appium setup, regardless of the remote server's real state. Add `_is_local_host` to gate the adb/device check on the Appium URL's host actually being loopback; a remote server now gets the TCP reachability probe only, same as iOS.
fcb9d78 to
18a4a52
Compare
|
Wouldn't it be better to just not have local adb runs in the whole repo?, we could you APPIUM/selenium remote shell execution to help us with adb discovery? |
…appium-host # Conflicts: # optics_framework/helper/execute.py
The execute preflight gate already honours OPTICS_SKIP_PREFLIGHT=1 as a blanket escape hatch, but none of the four abort panels said so — the flag was only documented on the CLI usage page. A user pointing a project at a remote or cloud-hosted device hits "No Android device/emulator attached" (or any of the other three) and has no in-context pointer to the one flag that would let the run proceed, since a hub-hosted phone will never show up in local `adb devices`. Append the hint in _abort_preflight rather than at each call site: the env var gates the whole gate uniformly, so every panel — present and future — should carry identical wording without relying on the next author to remember it. Covers all four panels: Appium server unreachable, adb missing, no Android device attached, and Selenium/WebDriver server unreachable.
|
thakur-patel
left a comment
There was a problem hiding this comment.
Product review: approved. I've reviewed the intent and use case of this change, and it makes sense from a user and product point of view. This covers product intent and use case only. I haven't reviewed the implementation, so please rely on the code reviewers for that.
Approval withdrawn: posted by mistake. This PR is outside the product review scope.



Summary
optics executepreflight had a mismatch which checked for local adb + at least 1 device even when remote appium hub URL was being used._is_local_hostto detect whether the Appium URL resolves to this machine (loopback), and only run the localadbdevice check in that case.