feat(backups): per-config opt-out of the retention floor#284
Merged
Conversation
The org retention floor (keep_daily 7 / weekly 4 / monthly 6) is great for the common case, but some backups are taken for data processing we're not authorised to keep beyond a few days. Drop the floor as an unconditional rule: it stays the default, but each retention config can opt out. Adds an allow_below_floor flag to backup_type_defaults and server_group_backup_schedule. When set, the floor is neither validated on write (set_type_default / set_schedule) nor enforced when the policy is resolved for kopia (resolve_policy). The flag travels with the winning retention source through resolution, so a dangerous override or dangerous default exempts its own type; everything else still gets the floor. Both retention UIs (the canopy-wide defaults editor and the per-(group,type) override editor) gain a 'dangerous' toggle that drops the floor validation and input minimums, with a warning, and a 'below floor' chip on the summary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
e5e468c to
7c6b4d3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 The org retention floor (keep_daily 7 / weekly 4 / monthly 6) is right for the common case, but some backups are taken for data processing we're not authorised to keep beyond a few days. This drops the floor as an unconditional rule: it stays the default, but each retention config can opt out.
What changed
allow_below_floorboolean onbackup_type_defaultsandserver_group_backup_schedule(migration, defaults false).set_type_default/set_schedule) nor enforced when the policy is resolved for kopia (resolve_policy). The flag travels with the winning retention source through resolution, so a dangerous override or dangerous default exempts only its own type — everything else still gets the floor.Scope decisions
Tests: scheduler unit tests for the new resolve path, private-server endpoint tests for accept-below-floor-with-flag on both endpoints, and Playwright coverage for both toggles.
Tag: TAM-6877