Release and recovery
A release process must answer three questions:
- What changed?
- Is the service healthy?
- How does the owner recover?
For a Worker app, that usually means: know the commit and Worker version, check a public route and error rate, and know whether you can roll back code without breaking D1.
Normal release
Section titled “Normal release”-
Merge a valid pull request.
Confirm all required GitHub checks pass.
-
Watch the Cloudflare build.
Confirm Workers Builds uses the merged commit.
-
Check the service.
Hit the public entry point and one critical path. Review errors and latency for the new version.
-
Record the result.
Keep the commit, deploy result, and any migration result.
Recovery decision
Section titled “Recovery decision”Roll back code when the previous Worker still supports the current data. Roll forward when data or bindings make rollback unsafe.
Treat a database migration as a separate recovery problem. Reverting Worker code does not reverse a D1 schema or data change. If you added a required column and the old code cannot read the new rows, roll forward.
Required recovery information
Section titled “Required recovery information”- Current and previous deploy identifiers
- Last known healthy commit
- Migration state
- Affected bindings and routes
- Rollback or roll-forward action
- Health check that ends recovery
Test schedule
Section titled “Test schedule”Test code recovery at least twice a year. Test database backup and restore when the project stores important D1 data.
High-risk projects need a shorter schedule. They may also require a human release gate or staged production rollout.