Pcornel
Automation · Idempotency

Idempotent Operations

Cheat sheet · https://pcornel.dk/topic.php?topic=5996

Back to the Topic

Answer

Idempotent operations can be repeated without changing the result after the first run, such as setting a value rather than appending it, or using PUT instead of POST in APIs.

Remember

  • Set, don't append.
  • PUT over POST.
  • Check before change.

First checks

  • Operations designed as "ensure state" — idempotent
  • PUT/upsert vs POST — API choice
  • Guards on commands (creates/unless) — protection

Verify in this order

ensure X → present? no-op : create

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5996

Confirmation

Confirm action

Continue?