Rollback playbook¶
Roll back or fix forward?¶
| Situation | Do this |
|---|---|
| The new version is broken, the previous one worked | Roll back |
| The previous version has the same bug | Hotfix |
| The new version changed the database | Hotfix, or roll back with the database backup |
| Security hole in the new version | Roll back, and hotfix in parallel |
There are no database migrations. The schema is created at first start and never altered afterwards, so an older version can fail on a database written by a newer one.
Docker image¶
-
Find the last good version:
-
Remove the current container and start the previous version with the same volumes:
-
If it fails on the database, restore the backup taken before the upgrade. The file is
docling_studio.dbin the/app/datavolume. - Check
curl -s http://localhost:3000/api/healthshows the previous version.
Docker Compose¶
Check out the previous tag and rebuild:
The database lives in the db_data volume.
HuggingFace Space¶
Upload the previous tag from a clean clone, as in the deployment checklist, and add --delete "*" to the hf upload command. Without it, files that only the newer version had stay in the Space. It also deletes any file that exists only on the Space side.
Afterwards¶
- Open an issue describing the failure, with the version and the logs.
- Fix it on a
hotfix/*branch frommain. - Deploy the fix with the deployment checklist.