AI CodeOps

Rollback

A rollback returns a system to its last known-good version after a bad release. Why the record matters, and how AI CodeOps tracks rolled-back deployments.

A rollback is the act of returning a system to a previous known-good version after a release goes wrong. It's the fastest way to stop the damage from a bad deploy, and it's usually followed by a fix that goes forward again.

What it is

There are a few ways to roll back. You can redeploy the previous build or image, switch traffic back to the old version in a blue-green or canary setup, or turn off the feature behind a flag. A revert commit is a related move: it undoes the change in the code, and the next deploy ships the undo.

Database changes are the hard part. A schema migration that dropped a column can't be undone by redeploying old code, which is why teams plan migrations to stay backward compatible.

Why it matters

A rollback is also a signal. Change failure rate, one of the four DORA delivery metrics, counts deployments that caused a failure in production, and rollbacks are among them. If rollbacks aren't recorded, the metric looks better than reality and the team learns less from each incident.

In AI CodeOps

AI CodeOps doesn't redeploy older versions or roll back on its own. Rollback is a status you mark on a deployment after you've rolled back in your own pipeline:

  1. Roll back in your deploy pipeline.
  2. Open Release → Deployments and find the deployment. You can filter by environment and status.
  3. Choose Mark rolled back on its row.
  4. Confirm the dialog, for example "Mark production @ 3f9c2a1b as rolled back?", with Mark as rolled back.

The dialog says plainly what this does: "This records the deploy as rolled back in the history. It does not redeploy anything: roll back in your deploy pipeline, then mark it here."

What changes:

status          succeeded → rolled back   (final; can't be changed back)
note            "Rolled back via dashboard"
dashboard       counts in change failure rate, not in deployment frequency
Deployments     the Rolled Back count goes up

Only succeeded or failed deployments show the button, and you need a role that can manage deployments: owners, admins, developers, members and DevOps admins. To keep the history complete, choose Record deployment afterwards with the version or commit SHA you restored.

To fix the cause, start a session on the project, or choose Fix with AI on the incident. The fix goes through the same quality gate and approval as any other change.

  • Deploy gate: the checks that try to stop a bad deploy before a rollback is needed.
  • Audit log: the record of who changed what in the workspace.
  • Human-in-the-loop: the approval every fix passes through.

Frequently asked questions

Does AI CodeOps roll back a deploy automatically?

No. You roll back in your own deploy pipeline, then mark the deployment rolled back in AI CodeOps so the history and metrics stay accurate.

Does Mark rolled back redeploy the previous version?

No. It only changes the deployment's status. Nothing is sent to your deploy webhook and no incident is opened.

Is a rollback the same as a revert commit?

Not quite. A revert adds a new commit that undoes a change. A rollback redeploys a previous build. Both end with the old behaviour back in place.