cloudflare worker rollback and secrets
Oct 23, 20261 min read
cloudflare worker rollback and secrets
after a secret binding changes, deploying an earlier Worker version fails with API error 10220. wrangler rollback handles it by listing the changed secrets, asking for confirmation, and retrying the deployment with force=true. that reverts every secret changed since the target version, not only the one you meant, so read the list before automating the confirmation. bound data (R2 objects, D1 rows) is not rolled back.
rehearse the rollback after any routing change that moves into secrets, and verify both the active version and the effective binding with a real request.
related
- deploy-path — untested deploy branches, rollback among them
- secrets
sources
- Wrangler 4.74.0
src/versions/rollback/index.ts(CANNOT_ROLLBACK_WITH_MODIFIED_SECERT_CODE = 10220, confirmation thencreateDeployment(..., force)), same path in 4.129.0; disposable Worker secret-binding reversal, typeaheaddocs/evals/compact-routing-rehearsal.json, 2026-10-17
Did you enjoy this article?
Recommend it — Standard Reader surfaces well-loved writing to more readers across the network.