You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(selfupdate): same-schema Core updates skip the rollback snapshot #1159
Same-schema Core updates skip the local rollback snapshot. A health-check failure then restores the image, not state.db. Any migration that ran at boot cannot be undone.
Found on master 6eadec3f. Schema is 2 today. Distinct from #989 (pin after Restart).
What happens
FullBackupRequired is true only when current and target schema differ (go/internal/selfupdate/selfupdate.go). Matching schema sets snapshotSkipped (go/internal/api/api_selfupdate.go).
Sidecar health failure rolls the image back. Docs still say a Core update always creates a rollback point (docs/backup-and-restore.md, docs/self-update.md).
A missing <!-- ftw-state-schema: --> comment sets TargetStateSchema = 0, which does require a backup, but the update is not refused.
Image-only downgrade to schema < 2 is blocked. That is the only schema guard.
What a fix needs
Always take a restorable snapshot before replacing a running Core, including same-schema updates (or document and implement “no snapshot ⇒ no automatic image rollback that leaves mutated state”).
Align the docs with the code, or the code with the docs.
Test: schema 2 → schema 2 update creates a snapshot that POST /api/version/rollback can restore.
Activity