Automatic Rollback
DeployPulse monitors install reports from devices and automatically rolls back a release if its error rate exceeds a threshold you set.
Auto rollback is available on every plan, including Free. It is not offered for Expo Updates apps: roll an Expo channel back by hand with dpctl rollback.
How it works
- Error rate is calculated as
DeploymentFailed / (DeploymentFailed + DeploymentSucceeded)events reported by the SDK for the deployment's current release - Checks run every 5 minutes across all deployments with auto rollback enabled
- A release is judged from 5 minutes to 24 hours after it was released. Outside that span it is left alone
- Nothing happens until at least Minimum Devices devices have reported, so a few early failures cannot trigger a rollback
- If the rate is at or above your threshold, the deployment rolls back to the previous release and a notification is sent
- A distributed lock prevents duplicate rollbacks across multiple server instances
Configuring auto rollback
Auto rollback is configured per deployment from the dashboard, when you create a deployment or when you edit one:
- Dashboard → select your app → Deployments, then Create Deployment, or open an existing deployment and select the edit (pencil) button
- Find the Auto-Rollback section and turn on Enable Auto-Rollback
- Configure:
- Error Rate Threshold: the percentage of failed installs that triggers a rollback (1% to 100%, default 5%)
- Minimum Devices: how many devices must report before a rollback can trigger (default 10)
The SDK must call codePush.notifyAppReady() after a successful update to report a success event. Low-traffic deployments may take a while to reach Minimum Devices within the 24-hour window: consider a lower minimum or a higher threshold for low-volume apps.
What happens on rollback
- The previous release becomes the active release for that deployment
- An email notification is sent to the account owner (for an organization's app, its owners and admins) with the deployment name, the rolled-back label, and the new active label
- The rollback appears in the release history for the deployment
