Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Rollback · Workflow Automation

Direct answer

Rollback in workflows runs compensating steps in reverse order when a later step fails, undoing what earlier steps did, also known as the saga pattern.

When to use this

Use this when workflows undo completed steps.

First 30 seconds

1. Rollback/compensation undoes completed steps after failure.

2. Saga pattern for distributed workflows.

3. Test compensation.

4. Some actions can't be undone — plan.

5. Log rollbacks.

Operational verification

failure → compensating steps in reverse

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
workflow orchestration semantics
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformworkflow orchestration semantics · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when workflows undo completed steps.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

The negative fixture should deliberately exercise risks such as branch condition drift, hidden dependency, duplicate parallel mutation, approval bypass, retry storm, partial rollback and successful orchestration with failed consumer state, choosing the cases most relevant to restore/revert identity, scope, prerequisites, dependency order and proving target/service state returns to the last known-good contract.

Step 2 Common mistakes Narrow the fault
  • Rollback steps that were never tested.
  • Rollback that fails silently and leaves partial state.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Compensating steps undo completed work in reverse.
  • This is the saga pattern.
  • Test compensations.
Key checks
  • Compensation steps (saga) — rollback logic
  • Rollback tests — proof
  • Partial completion handling — state
ReferenceWhy it matters1 section · depth on demand

What it is

Workflow rollback runs compensating steps in reverse order when a later step fails (undo VLAN, remove DNS record).

ReferenceImportant terms & boundaries1 section · depth on demand

Worked example

Rollback in a workflow undoes completed steps when a later step fails. Because steps often act on different systems, workflow rollback is usually done with compensating actions: each step that changes something has a matching step that reverses it, and on failure they run in reverse order (the saga pattern).

Worked example: provisioning a VM — (1) reserve IP in IPAM, (2) create DNS record, (3) create VM, (4) register in monitoring. If step 3 fails, the workflow runs compensations for 2 and 1: delete the DNS record, release the IP. Without them, every failed run leaks an IP reservation and a DNS entry.

Design compensations to be idempotent and tolerant of partially completed steps, and record when a compensation itself fails — that needs a human.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docworkflow orchestration semantics current

Authoritative/upstream documentation reviewed for bounded claims in Workflow Automation > Rollback. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax · confidence 94%
Confirmation

Confirm action

Continue?