Danger
err:unkey:application:deployment_is_currentExample
What Happened?#
You called promoteDeployment or rollbackDeployment targeting the deployment that is already serving production traffic. In the normal case this would not change anything, so it is rejected to surface a likely mistake in the request rather than silently doing nothing.
The one exception is on promoteDeployment: if the app is currently in a rolled-back state, promoting the current deployment is allowed, because it confirms moving forward off the rollback instead of being a no-op. rollbackDeployment always rejects the current deployment, whether or not the app is rolled back.
getDeployment reports isCurrent: true for the current deployment.
How To Fix#
- Fetch the target with
getDeploymentand checkisCurrent. - If you intended to change which deployment is current, target a different deployment.
- If the deployment is already current and that is what you want, no action is needed.
Common Mistakes#
- Re-promoting the current deployment: Promoting the deployment that is already current.
- Stale deployment id: Acting on an id that has since become the current deployment.
Related Errors#
- err:unkey:application:deployment_no_current - When the app has no current deployment to act over
- err:unkey:application:deployment_not_ready - When the target deployment cannot serve traffic
- err:unkey:application:deployment_not_production - When the action requires a production deployment