NEC-95: Pre-deploy copies are pruned by sha, so each new one is deleted as it is made #149
No reviewers
Labels
No labels
area:docs
area:identity
area:ops
area:plugin
area:server
channel:community
channel:direct
channel:owned
channel:press
channel:social
e2ee-constrained
gate:at-ga
gate:pre-ga
marketing
parity
relay:absent
relay:planned
relay:requested
relay:supported
risk:additive
risk:contract
risk:none
usability
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Nectenda/nectenda!149
Loading…
Reference in a new issue
No description provided.
Delete branch "worktree-nec-95-pre-deploy-copies-are-pruned-by-sha-so-ea"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task: NEC-95 — https://projectron.nerchure.com/tasks/95
Pre-deploy database copies were pruned by sorting their whole name, pre-deploy--.db, so the three highest shas survived rather than the three newest copies, and each new copy whose sha sorted low was deleted as it was made (observed on eu1: none of 24 September's three copies survived). pruneMatching now orders by the trailing stamp, then name, and never prunes a name it cannot date. Review found a second route to the same loss, a host clock behind the copies on disk, so preDeployCopy now always spares the copy it just took. New tests use shas that sort against time and reverse readdir order; every rule was mutation-checked. deploy/RESTORE.md tells an operator to check the stamp, since a host not yet deployed with the fix may hold the wrong three. Post-deploy check on eu1 and identity to follow on the card.
Spec:
docs/changes/NEC-95-pre-deploy-prune-by-stamp/spec.mdChangelog
The server's pre-deploy database copies now keep the most recent ones, rather than the ones whose release ids happened to sort highest.
d28576594ad30286f93bd30286f93bd0eb0d048c