liveBook · Manning

Rollback

As explained in GitHub Actions in Action: Continuous integration and delivery for DevOps

Rollback is the process of returning a deployment or system to a previously known good version or state.

Rollback returns a deployment to the last known good state when health signals, metrics, or production behavior show that the new version should not proceed. It can abort a deployment before wider traffic exposure or restore the previous behavior after release. section 9.3.4 section 9.3.5

A practical rollback workflow can:

  • Wait for the new deployment to report readiness through a health endpoint before testing it. section 9.3.4
  • Monitor liveness or other health signals while moving traffic gradually to the new version. section 9.3.4
  • Compare metrics such as memory usage with the known-good deployment profile and abort or revert when anomalies appear. section 9.3.4
  • Disable a feature toggle to show the old implementation again without uninstalling the deployed software. section 9.3.5
Listing 9.9 Checking the health status
      - name: ensure deployment is healthy before we test
        run: |
            HEALTH_ENDPOINT="https://${{stagingurl}}/health/ready"
            while true; do
              response=$(curl -s "$HEALTH_ENDPOINT")
              status=$(echo "$response" | jq -r '.status')
  
              if [[ "$status" == "Healthy" ]]; then
                echo "Health endpoint current status :" $status
                break
              fi
              echo "Waiting for health endpoint..."
              sleep 1
            done
        env: 
          homepage: ${{ needs.deploy.outputs.homepage }}

Use the health-check listing to gate deployment testing until the ready endpoint returns a Healthy status. section 9.3.4

Feature-toggle rollback

Deploy the new implementation while keeping its feature toggle off. Validate the deployment and then expose the feature gradually. If the new behavior degrades production, switch the toggle off to restore the old implementation. section 9.3.5

How GitHub Actions in Action: Continuous integration and delivery for DevOps covers it

How deep it goes
Explains rollback triggers and operational techniques, but stops short of detailing rollback storage or recovery implementation.
Examples
Demonstrates readiness polling, health monitoring, metric comparison, gradual traffic exposure, and feature-toggle reversal.
What it assumes
Assumes deployment and release can be separated, while introducing health checks, metrics, feature toggles, and traffic routing as rollback mechanisms.
What you can do after
Operate/configure deployment gates and release controls that restore the last known good behavior when signals indicate failure.
How it connects
Connects rollback with health endpoints, metrics endpoints, feature toggles, traffic routing, deployment, and release.

Also explained in

Compare how 8 books explain rollback →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of GitHub Actions in Action: Continuous integration and delivery for DevOps. The section links point to the parts of the book it draws on.