Repository navigation
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…droid device Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two settings for the remote debug (
adb connect <host>:<port>) of STF.REMOTE_CONNECT_HOST--connect-url-patternof STF, used for bothstf provider(Android) andstf ios-device(iOS).STF_PROVIDER_HOST, so nothing changes. The pattern is computed once:"${REMOTE_CONNECT_HOST:-$STF_PROVIDER_HOST}:<%= publicPort %>".STF_PROVIDER_*:stf providerreads those as its options, and the entrypoint unsets the empty ones./or whitespace. An invalid value is logged as ERROR and the entrypoint exits with0.--host,STF_PROVIDER_HOSTand the screen WebSocket URL pattern still useSTF_PROVIDER_HOST.STF_PROVIDER_CONNECT_PORT(Android)--connect-portoption ofstf providerin the STF fork. It replaces the second port of theSTF_PROVIDER_MIN_PORT..STF_PROVIDER_MAX_PORTpool. mcloud-agent sets it from theconnect_portsetting of the device and publishes the port.stf providerreads it from its environment (.env('STF_PROVIDER')). The entrypoint only removes the emptySTF_PROVIDER_*variables, so a set value reaches the provider and no extra argument is needed. Empty = the second port of the range, as before.1024-65535when set. An invalid value is logged as ERROR and the entrypoint exits with0.stf providerhas the--connect-portoption. The provider is strict, so an older one stops on the unknown option.stf ios-devicehas no env prefix, and its--connect-portisMJPEG_PORT(unchanged).Both are in the Dockerfile
ENV("", STF provider group) and in the README Configuration table.Why
Device hosts (mcloud-agent) can sit in a private LAN behind one public MCloud server. Everything already goes through the MCloud server except the remote debug: STF shows
adb connect <LAN address of the agent>:<port>, which users outside the LAN can't reach.ADB_RELAY_HOSTS, nginx stream) forwards the device ports of the agents from the public address of MCloud. With it,REMOTE_CONNECT_HOSTis the public name of MCloud.STF_PROVIDER_CONNECT_PORTper device makes the port predictable, so it can be published and relayed.Tests
tests/entrypoint_test.sh:REMOTE_CONNECT_HOST:STF_PROVIDER_HOST;--host(iOS) andSTF_PROVIDER_HOST(Android) are unchanged;STF_PROVIDER_CONNECT_PORT:abc,80,1023,65536,99999,07400,0x1F90, trailing space, negative) are reported, exit with 0 and start nothing;1024,7400and65535are valid;--connect-portstaysMJPEG_PORT.make test: all entrypoint tests pass. The only failure is intests/repo_test.shand also happens on develop: "the base image and the build stage areFROM public.ecr.aws/zebrunner/stf:3.1has no digest.make lint: passes except one check with the same cause: "README lists the Dockerfile version of FROM ...stf...@" (the pattern needs the digest).make docker: the image tests did not run. The build fails first withpublic.ecr.aws/zebrunner/stf:3.1: not found: the base image is not published yet.