Robocubs / Robocubs/RobocubsMissionControl
Beta deploy automation: beta app connection triggers Pi branch switch
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Overview
When opening the beta TestFlight build of PitMissionController, the app should automatically trigger the Pi server to switch to the ground-control branch and restart — no manual SSH or deploy steps needed.
Flow
- Beta app connects to the existing WebSocket server (running on
main) - During handshake it sends a
{"type": "betaHandshake"}message - Server detects it's a beta client, spawns a background subprocess:
git checkout ground-control && git pull && cd CartInformationDisplays/frontend && npm run build && sudo systemctl restart missionControlServer.service - Server restarts (~5–10s), now on
ground-control - App auto-reconnects (reconnect logic already exists in
WebsocketEngine.swift)
Switching back to production works in reverse — the production build sends a prodHandshake, server redeploys main.
Implementation notes
WebSocketManager.reconnect()already handles reconnection with a 2s delay, so no iOS changes needed for the reconnect behavior- On reconnect,
stateL/stateRreset to.Screensaver— expected behavior during a deliberate deploy - Guard: only trigger the deploy if the server isn't already on the target branch (
git branch --show-current) to avoid redundant redeploys when opening the app multiple times - The Pi's IP is stable at
192.168.105.10on the competition hotspot, so the endpoint is persistent — no Remote.it or dynamic DNS needed
Files to change
CartInformationDisplays/main.py(or relevant routing file) — addbetaHandshake/prodHandshakemessage handlers that spawn the deploy subprocessPitMissionController/RequestRouter.swift— sendbetaHandshakeon connect (for beta build;prodHandshakefor production build)- Deploy script on Pi —
git checkout <branch> && git pull && npm run build && systemctl restart
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CartInformationDisplays/main.py and PitMissionController/RequestRouter.swift, then review the existing WebsocketEngine.swift reconnect behavior. Trace the handshake path and the Pi deploy script, including the target-branch guard. Done means beta and production handshakes trigger the appropriate deployment and the app reconnects after the server restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python, swift
- Domain
- backend, devops, mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100