Repository navigation
Prebuilt binaries, and the grid: model/OS routing, enforced leases, status and UI - #25
Merged
Merged
Conversation
make dist builds every CROSS target static (CGO off) and without build paths (-trimpath), as mobium_<version>_<os>_<arch>.tar.gz (.zip for Windows) holding the binary, LICENSE, THIRD_PARTY_NOTICES.md and the README, with SHA256SUMS. Built here: six archives of about 4MB, every checksum OK, the darwin/arm64 binary reporting its version and holding no path from this machine. The release workflow runs make test and make dist on a v* tag, checks every archive against SHA256SUMS and the Linux binary's --version, and attaches them to a GitHub Release; on a pull request touching it or the Makefile it does all of that but the release. SETUP.md says how to install one, and that on macOS a download goes by curl, the binaries not being notarized.
MOBIUM_GRID_MODEL and MOBIUM_GRID_OS narrow routing; the node now reports each device's OS (Android's release, iOS's runtime), and OS matches at the start of a word, so 17 is Android 17 and not 15. Leases move to internal/grid, and every daemon on a node now refuses a device leased to a holder other than its own session. Each grid run gets a daemon of its own on its node, named by its lease, stopped when the run ends. Live: a run holding the Android 17 emulator kept it while a mobium --device run on the node that bypassed the grid was refused, naming the holder, and the free emulator stayed usable. A run that got no device left a daemon of its own on the node: the grid's queries ran in the run's session and started one to list devices. Queries and leases now use the node's default daemon, and only the run's connection has a session of its own.
mobium grid status prints each node's devices -- platform, OS, model, state -- who holds each and for how long, the nodes down, and the runs waiting; mobium grid ui serves the same as a page on 127.0.0.1, one embedded file, refreshed every three seconds. Both read the grid node answer routing reads. For the view, a lease now records when it started (a renewal moves only the file's time), and a queued run leaves a note on each node it asked, touched every two seconds and lapsing after 15. Building it showed the grid listing a real iPhone as free to route to. A node now lends every emulator and simulator, and a physical phone only when its own environment sets MOBIUM_GRID_PHONES=1; a run asking for one by serial is told the node does not offer it. Live: two runs holding both emulators and a third queued showed as held, held and waiting in status, status.json and the page, with a dead node not answering; the port listened on 127.0.0.1 alone.
…he lease test a portable temp dir daemon status and grid status share a name, and sorting by name alone reordered their rows from run to run, so flags-check failed at random. The lease test made its home under /tmp, which Windows does not have.
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.
Prebuilt binaries ready for a first release, and the grid's next stages: routing by model and OS, leases the node enforces, and a view of it all.
Prebuilt binaries
make distbuilds every platform — macOS, Linux and Windows, amd64 and arm64 — static (CGO_ENABLED=0) and without build paths (-trimpath), asmobium_<version>_<os>_<arch>archives holding the binary, LICENSE, THIRD_PARTY_NOTICES.md and the README, withSHA256SUMS..github/workflows/release.yml: on av*tag it tests, builds, checks every archive and the Linux binary's--version, and attaches them to a GitHub Release; on a pull request touching it or the Makefile, everything but the release — so this PR runs it.curlon macOS, the binaries not being notarized. Nothing is published until a tag is pushed.Grid
MOBIUM_GRID_MODEL,MOBIUM_GRID_OS(matched at the start of a word, so17is Android 17 and not 15); nodes report each device's OS.internal/grid; each grid run gets a daemon of its own on its node, named by its lease, and every daemon there refuses a device leased to another. Live, a run bypassing the grid was refused the leased emulator, naming the holder. A run that got no device no longer leaves a daemon on the node.mobium grid statusandmobium grid ui(a page on127.0.0.1, refreshed every few seconds): devices, who holds each and for how long, nodes down, and runs waiting.MOBIUM_GRID_PHONES=1in its own environment — the view had listed a real iPhone as free.make cipasses. Swept for personal data: none.