Skip to content

Roll back a deployment

A code rollback moves the environment’s active deployment. It does not move an asset’s latest pointer. puppi rollback is the data pointer. This page is the code pointer.

List the deployments, newest first, and copy the id of a row whose status is ready:

Terminal window
curl -s \
-H "Authorization: Bearer $PUPPI_API_TOKEN" \
"$PUPPI_ENGINE_URL/api/v1/environments/hello/deployments"

PUPPI_ENGINE_URL defaults to http://127.0.0.1:4000 for the CLI. Activate that id:

Terminal window
curl -X POST \
-H "Authorization: Bearer $PUPPI_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{}' \
"$PUPPI_ENGINE_URL/api/v1/deployments/<id>/activate"

The response is the deployment, with "active": true. A run that already started keeps the deployment it started on.

Activation re-checks stored columns against the schemas in the deployment you pointed at. A quarantine that came from a schema change lifts when the previous contract matches those columns. The details are in Deploy and rollback.

To move an asset’s data back to an earlier materialization, use puppi rollback instead. That command leaves the active deployment where it is.