Rollbacks
Rollbacks enable you to quickly pin all traffic to a recent deployment in case something goes wrong. This can be particularly helpful if your latest deployment’s code or configuration introduces runtime bugs.
Triggering a rollback
Section titled “Triggering a rollback”To manually roll back traffic to a specific deployment:
- Navigate to your app in the dashboard
- Open the Actions menu of the specific deployment
- Select the Rollback action
- Confirm the action
Traffic pinning
Section titled “Traffic pinning”Rollbacks pin all app traffic to the target deployment. After a rollback, traffic no longer automatically routes to the latest ready deployment. This prevents automation and teammates from immediately deploying the problematic code or configuration again.
Unpinning traffic
Section titled “Unpinning traffic”To automatically route traffic to the latest ready deployment again, unpin traffic from all pinned deployments:
- Navigate to your app in the dashboard
- Look for the 📌-icon to find pinned deployments
- Open the Actions menu of a pinned deployment
- Select the Unpin action
- Confirm the action
Affected configuration
Section titled “Affected configuration”Rollbacks use the container image build and most configuration from the target deployment (🎯), while custom domain settings are based on the app’s current configuration (🆕), as shown in the following overview:
| Configuration | Source | Explanation |
|---|---|---|
| Container image build | 🎯 | The build from the target deployment is reused |
| Environment variables | 🎯 | The environment variables from the target deployment are reused |
| Autoscaling settings | 🎯 | The autoscaling settings from the target deployment are reused |
| Instance size | 🎯 | The instance size from the target deployment is reused |
| Custom domains | 🆕 | The app’s current custom domains setup is used |
| Traffic | 🎯 | The app’s traffic is pinned to the rollback target |
Rollback targets
Section titled “Rollback targets”Only deployments in the Ready state are valid rollback targets. FastAPI Cloud keeps at least the previous 5 ready app deployments around for rollbacks.