Skip to main content

deployment_is_current

The target deployment is already the current deployment, so promoting or rolling back to it would be a no-op.
1 min read
Danger
err:unkey:application:deployment_is_current
Example

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#

  1. Fetch the target with getDeployment and check isCurrent.
  2. If you intended to change which deployment is current, target a different deployment.
  3. 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.