Repository navigation
ci: move Mac mini jobs to Namespace runners - #923
Conversation
75eb6a3 to
3ff1375
Compare
|
This is now the go-to way to move iOS E2E off the Mac mini, replacing the split GitHub-hosted stack (an Ubuntu job running the regtest stack, joined to a macOS tester over Tailscale) from #689, #692 and synonymdev/bitkit-e2e-tests#208. Those PRs are back in draft. Here the whole run is one job on a Namespace Mac: the regtest stack runs on a Namespace Linux instance and its ports are forwarded to the runner's localhost, so the test suite and the app need no changes and there is no second job to coordinate. |
[Medium impact] The changes affect two bounded CI workflows and their temporary test infrastructure. The PR appears safe to merge, with non-blocking feedback to pin the fallback Compose download. Findings
SummaryMoves the E2E and Trezor emulator jobs from the Mac mini to Namespace macOS runners.
Acknowledged scope from Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Namespace macOS runner] -->|Create and copy stack files| B[Namespace Linux instance]
A -->|Docker context| B
A -->|SSH for docker exec| B
B --> C[Regtest and emulator containers]
D[iOS simulator and tests] -->|Local forwarded ports| C
C -->|Copy LND credentials| A
A -->|Destroy after job| B
Reviews (1) · Last reviewed commit: "ci: run docker exec on the Namespace ins..." · Reviewed by Greptile |
talosmachina
left a comment
There was a problem hiding this comment.
1 finding (1 P1). Moves iOS E2E and the Trezor emulator job off the self-hosted Mac mini onto Namespace macOS runners, with the regtest stack on an ephemeral Namespace Linux instance and its ports forwarded to 127.0.0.1. Reviewed 3ff1375, full tier.
What I checked, and 4 candidates I ruled out
Read in full: .github/scripts/namespace-stack.sh, .github/workflows/ai-device-tests.yml, .github/workflows/e2e-tests.yml, BitkitUITests/TrezorBridgeDashboardUITests.swift
Cross-repo: bitkit-e2e-tests docker/docker-compose.yml, test/helpers/constants.ts, scripts/trezor-emulator; bitkit-docker docker-compose.yml, scripts/trezor-emulator
CI: not run on this PR yet (the changed jobs are path-filtered or dispatch-only); reasoned from the code, iOS does not build on Linux.
Ruled out
- E2E suite lacks funds on the fresh chain: bitkit-e2e-tests'
ensureLocalFunds()mines its own blocks, which matches the 14/14@ios_gaterun in the description. - LND credentials missing locally: the new copy step pulls
admin.macaroonandtls.certto the pathsconstants.tsreads. - Ports the app or tests dial but are not forwarded: Electrum 60001, bitcoind RPC 43782, LND 8080/9735/10009, backup 3003 and Bridge 21325 are all in the forward lists; the Trezor job's
trezor-emulatorscript uses 9001 and 23902, both forwarded. docker execsilently succeeding through the Namespace context: the wrapper routesexecovernsc ssh, andGITHUB_PATHputs it first for later steps.- Cold reader: the finding stood.
Merge confidence: 3/5, one P1 in the Trezor job.
jvsena42
left a comment
There was a problem hiding this comment.
Code scan: no HIGH/MEDIUM. One LOW is inline.
Checked and clean:
- Secrets:
e2e-tests-localandtrezor-emutake no repo secrets. Signing and release workflows don't use the Mini. - Gating:
e2e-statusstill requirese2e-tests-local == success, so a missing Namespace profile leaves the check pending instead of passing. - Cleanup: teardown runs under
always(), and--duration 4hbounds orphaned instances. - Routing: the test suite and both Trezor scripts use plain
docker exec, which the wrapper routes overnsc ssh.
Worth checking, not a finding: fork PRs run namespace-stack.sh from the merge ref on a runner holding nsc workspace credentials. The Mini had the same exposure, so this isn't worse, but check the Namespace profile's fork policy, or gate the job on head.repo.full_name == github.repository.
Not approving yet: e2e-tests-local, the job this PR moves, is still running at a94a902. I'll approve once it's green. The red Run Tests is a simulator launch denial (The request was denied by service delegate (SBMainWorkspace)) in a workflow this PR doesn't touch; it needs a re-run before merge.
Device gate: no device check needed (CI only); perf: not relevant; l10n: no UI text changed.
|
Results on this PR: 13 of 14 What happens:
What differs from the Mini:
So the likely cause is a recent app change that breaks the fixed-amount LNURL pay flow on iOS 26.2+, which current phones run and the Mini's older simulator does not exercise. That is an inference from these results, not a confirmed root cause. It needs someone who knows the send flow; it is outside this PR. |
|
Update: E2E is green on this PR. 39404241526 on 28a9e27 passed Correction to my LNURL comment above: Current checks:
Since the last review: the detect-changes gap is fixed (28a9e27), Talos's funding finding is fixed (a94a902), and the Compose download is pinned (93cb30a). |
jvsena42
left a comment
There was a problem hiding this comment.
Approving. My LOW is fixed in 28a9e27, and e2e-tests-local is green on the Namespace runner at this head (run 39404241526), so the condition I held the approval on is met.
@lnurl_1failed once and passed on retry within that run: a fixed-amount LNURL pay opened an empty send sheet on the iOS 26.2 simulator. The first LNURL pay in the same spec succeeds through the forwarded ports, so this looks like an app timing race rather than the runner move.- The red SwiftFormat check is on master's
ActivityRow.swift:104, the same on the last three master heads; #1040 fixes it.
Device gate: no device check needed (CI only); perf: not relevant; l10n: no UI text changed.
|
@mdozhdev please, rebase this branch to get the lint fix |
The self-hosted Mac mini ran Docker and the iOS Simulator on one machine. Hosted macOS runners are VMs without nested virtualization, so the regtest stack now runs on a Namespace Linux instance created per job, with its ports forwarded to the runner's loopback under the same numbers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…re starting the emulator The hardware wallet specs start their own Trezor emulator and reach its bridge on 127.0.0.1:21325. The LNURL spec runs its own server on 127.0.0.1:30001, so that port must stay free on the runner. trezor-emulator start checks the bridge before returning, so ports are forwarded first. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
docker exec through the attached context returns no output, drops piped stdin and always exits 0, so the Trezor emulator scripts, which drive the emulator through docker exec, silently did nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Each run starts a new chain, and bitcoinsetup mines a single block whose coinbase is immature, so sendtoaddress in the Trezor UI test failed with insufficient funds. The Mini kept a funded wallet because its teardown never removed the bitcoin_home volume. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
28a9e27 to
9346e43
Compare
|
Merged, as it was approved and green. |
|
Triage: milestone 3.1.0. A CI change that moves the Mac mini jobs to Namespace runners and ships with the next minor; it closes no issue, so this PR carries the milestone itself. |
Refs: #689
This PR moves the two jobs that need the self-hosted Mac mini, iOS E2E and the Trezor emulator tests, onto Namespace macOS runners, so the Mini can be retired.
Description
e2e-tests-localand the Trezor emulator job onnamespace-profile-macinstead of[self-hosted, macOS]. Each run gets a fresh machine, so runs no longer queue behind each other or inherit leftover state.127.0.0.1under the same numbers, so the E2E suite, the app'sEnvdefaults and the Trezor UI tests need no changes.namespace-stack.sh, shared by both jobs. It creates the instance, copies the compose directory to it (bind mounts resolve on the instance), forwards ports, and tears the instance down.docker/lnddirectory.build-local.lnurl-auth-server,vss-serverandhomegatefrom sources the workflow never checks out, and it only worked on the Mini because those images were already cached there.docker execon the instance overnsc ssh, because exec through the Namespace Docker context returns nothing and reports success; the Trezor scripts drive the emulator through exec.host.docker.internalfor the Trezor User Env container, which Docker Desktop provides on the Mini and plain Linux Docker does not.self-hosted-cleanup.yml, which only cleaned the Mini's disk.Out of Scope
synonymdev/bitkit-ios, with a macOS runner profile namednamespace-profile-mac(macOS 26, Xcode 26.2 installed). Until then the changed jobs stay queued..github/workflows/e2e-tests.yml: attempts 2 and 3 still reuse the chain attempt 1 left behind, as on the Mini..github/workflows/e2e-tests.yml:build-localstays onmacos-latest; only the job that needed Docker moves.BitkitUITests/TrezorBridgeDashboardUITests.swift: the two tests that fail on the new runner; the job has no green baseline on the Mini either.Design
N/A — no UI changes.
Preview
N/A — no user-visible changes.
QA Notes
Journeys
N/A — no user-visible behaviour change.
Manual Tests
N/A
Automated Checks
127.0.0.1under its own number, and bitcoind RPC, Electrum and LND REST over TLS responded from the runner@ios_gatesuite on that setup: 14 of 14 passed on the first attempt in 56 minutes, hardware wallet includedTrezorBridgeDashboardUITestson that setup: the emulator and Bridge came up and 1 of 3 tests passed; the other two failed inside the tests (a regtest RPC helper error and an assertion). This job has no green run onmasterto compare with, so those two need separate investigationdocker execthrough the Namespace Docker context returns no output, drops stdin and always exits 0, which is why exec now goes overnsc sshe2e-tests-local - e2eruns onnamespace-profile-macande2e-statusreports as beforeai-device-testswithtrezor-emustarts the emulator onnamespace-profile-macand reaches the UI tests🤖 Generated with Claude Code