You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
obc data v2 · P4 — The VPS follows the bucket; service code deploys separately #2652
Part of #2648. Read the epic first: it holds the model and the decisions.
Goal
Publishing data needs only R2 and one HTTPS request: no SSH and no outage. A rollback is instant. Deploying service code is a separate, rare step.
Scope
obc data serve prod runs on the VPS as one systemd service. It extends the P3 program:
it polls planner/next.json and planner/catalog.json over public HTTPS, so it needs no R2 credentials;
it downloads the objects of a new release (routing package, search databases, offline bundles) and verifies each digest;
it starts that release's services beside the current ones;
it answers GET /planner-api/releases/<id>/ready;
it keeps the serving release and the rollback running, and stops older ones.
One stable route. The follower is the only reverse proxy behind Caddy for /planner-api/ and /planner-offline/. It sends each request to the process of the release ID in the URL. Caddy is configured once and never rewritten; there are no systemd units per release.
Publisher protocol (P2's update):
upload;
write planner/next.json;
wait at Router ready (up to 24 h, with heartbeat);
write planner/catalog.json.
A dir target skips the wait.
Format check. Each service binary reports the formats it reads (extend planner-service --obc-build-identity, and add the same to search and downloads). If a release needs a format the installed code cannot read, ready says not ready: needs planner-service with routing format 9, and the publisher waits without changing prod.
Service code deploy. One script, outside obc data, builds the service binaries for the VPS target in data/planner-runtime.toml, copies them and restarts the follower. It runs only when service code changes.
Delete:
the VPS install in host/obc-data-steps/src/planner/publish.rs;
This follow-up for P4 comes from the P3 review (#2671).
obc data serve has no /planner-offline/ route yet. iOS OfflineMapStore hard-codes https://releases.openbikecomputer.com/planner-offline/, so a Debug phone that reads local still downloads offline maps from the published service.
P4 makes the follower the only route for /planner-offline/ (scope item 2). So that P3's local override works end to end, iOS should take the offline API from the origin of the catalogue, not from a fixed host.
LocalFirstPlanner prefers an installed offline map that covers a request over the online source. A developer who tests local must remove such maps, or the companion README must say this. P3-b adds that sentence.
The follower keeps its objects in its own store and deletes the objects that next, serving and rollback do not read. It deletes them only while no download runs (#2684, #2686).
Still to do, outside the code: the owner installs the follower on the VPS once, with the steps in tools/vps/README.md (unit, deploy, Caddy route). The legacy routes stay until P8.
Activity
timohueser commentedon Oct 12, 2026
This follow-up for P4 comes from the P3 review (#2671).
obc data servehas no/planner-offline/route yet. iOSOfflineMapStorehard-codeshttps://releases.openbikecomputer.com/planner-offline/, so a Debug phone that readslocalstill downloads offline maps from the published service./planner-offline/(scope item 2). So that P3's local override works end to end, iOS should take the offline API from the origin of the catalogue, not from a fixed host.LocalFirstPlannerprefers an installed offline map that covers a request over the online source. A developer who testslocalmust remove such maps, or the companion README must say this. P3-b adds that sentence.Generated by Claude Code
timohueser commentedon Oct 12, 2026
P4 is complete in code. Five pull requests did it:
obc data serve prodAcceptance, tested with a bucket served over HTTP:
ready, then the switch: the update test in feat(obc-data): an R2 update switches once the follower serves the release (P4-c) #2684 checks at each answer thatnext.jsonnames the new release andrelease.jsonstill serves the old one. The follower half is in obc data v2 · P4-a — the follower: obc data serve prod #2679.not ready, the publisher waits, and prod stays unchanged: feat(obc-data): an R2 update switches once the follower serves the release (P4-c) #2684. The run gives up at the injected limit;release.jsonand both pointers stay byte-identical andnext.jsonis gone.The follower keeps its objects in its own store and deletes the objects that next, serving and rollback do not read. It deletes them only while no download runs (#2684, #2686).
Still to do, outside the code: the owner installs the follower on the VPS once, with the steps in
tools/vps/README.md(unit, deploy, Caddy route). The legacy routes stay until P8.Generated by Claude Code