Skip to content
Stackship documentation Svenska

Container instancesUsers

Compare and roll back revisions

See every saved change to a container instance's configuration, compare a revision with the one before it, and roll the instance back to an earlier one.

Requires: containerinstance/write

The Revisions tab lists the history of the instance's configuration, newest first. Reading it needs containerinstance/read; rolling back needs containerinstance/write.

What is recorded

A revision is recorded when the instance is created, each time its configuration is saved — on the Components and Endpoints tabs, or through the CLI or the API — and on each rollback. Starting, stopping, restarting, re-deploying and scaling with stsh ci scale do not add revisions.

Each revision shows its number (r1, r2, …), what kind of change it was, whether it was applied, who made it and when. The newest is marked Current. The first revision is labelled Deployed from template — also for an instance created in the wizard or with the CLI; later ones are Edited or Rolled back, and for an instance deployed from a blueprint also the template changes.

A revision holds the configuration as it was, literal environment variable values included. The content of sensitive files is not kept; revisions store it as <redacted>.

Compare with the previous revision

Choose Compare on a revision to see what changed since the revision before it: the changes to the specification, and for an instance deployed from a blueprint the template version and parameters.

Roll back

  1. Choose Roll back on the revision to return to.
  2. The row says which components the rollback adds back or removes. Choose Roll back again to confirm.

The instance's configuration is rewritten to that revision, as if it had been saved: components whose configuration changes get new pods, and a new Rolled back revision is added.

  • The instance keeps its managed identity, and sensitive files keep their current content. A sensitive file the instance no longer has — in a component or volume the rollback adds back, for example — cannot be restored: it is written with the text <redacted> as its content. Send the real content afterwards with an update.
  • On an instance that uses vault secrets, rolling back needs the Owner role on those vaults, as every save does — see Permissions.
  • A component the rollback adds back re-attaches its kept persistent volume, with the data it holds now.
  • A rollback that would give a component a compute plan the boundary no longer allows is refused.
  • When someone else has changed the instance since you opened the tab, the rollback is refused rather than overwriting their change; reload and try again.

With the API, POST …/containerinstances/<name>/revisions/<number>/rollback rolls back, and ?ifMatchRevision=<current number> makes it refuse when the instance has moved on.