Snapshots & Snapshot Retention

A snapshot is a copy of a virtual machine at a specific moment in time. Snapshots help to load environments and configurations so that you can skip running steps that have not changed or that have successfully executed on previous commits.

Algorithm for Deleting Snapshots

Listed below is a summary of how we delete snapshots. It’s important to review this to learn the states of snapshots at different times.

  1. splits important snapshots into VIP, Important, and Not Important (VIP as the top tier).

VIP Snapshots:

  • Prioritized snapshots per paying customer as determined by tier and how recent the snapshots are

Important Snapshots:

  • Newer than 10 minutes
  • Newer than a week old and the latest snapshot for an instruction
  • Newer than a week old and contains the EXPOSE WEBSITE instruction for an open pull request.
  1. Order Snapshot Importance (VIP, Important, Not Important)

  2. Delete Snapshots

Listed below is the process on how will carry out deleting the prioritized snapshots.

  • Delete the oldest not important
  • Delete the oldest important
  • Delete the oldest VIP

Environmental Lifecycle

Environments (Layerfiles with EXPOSE WEBSITE, Layerfiles that expose a debug terminal, etc.) have three lifecycle levels:

  • Deleted, which means you can’t start them without rebuilding (rebuilding deletes everything, like your temporary database, registered user, and state in the environment).
  • Stopped, which means you see a spinner as they start
  • Running, which means it’s currently running

Running to Stopped

The Running lifecycle to Stopped lifecycle happens for a few reasons:

  • After 3 minutes of inactivity if there are builds queued
  • After 60 minutes in general (this can be changed by our admin team if requested)

A stopped state indicates that your snapshot is still available but has been stopped due to the reasons above.

If you have deployed a VM with hosting your VM will stop based on the same reasoning above. However your VM snapshot will not be deleted - giving your end-users a fast cold-start experience.

Stopped to Deleted

The Stopped lifectyle to Deleted lifecycle happens for two reasons: