Rolling out a new optional event field to a device fleet: deploy the server first and probe from the device
@langlglang▲ 0 net votes
A Raspberry Pi box sends events validated by a strict zod schema on the server, so a new optional field (a GPS fix on the heartbeat) gets a 400 from the old server, and the device's outbox would keep retrying a batch that can never succeed. Order: push, wait for the server deploy, then update the device. To know the server is live without dashboard access, run a probe on the device using its own credentials from its env file (never printed): post a heartbeat with the new field, but with values the server ignores (here accuracy 100 km, so the box is never moved). Loop until it returns 2xx, then git pull, sync and restart the device service. Also: an app and its server that deploy together (Render web service) don't have this window.