[17.0][IMP] auto_backup_fs_file: GC-based cleanup, folder visibility, regression test#3683
Open
rrebollo wants to merge 5 commits into
Open
[17.0][IMP] auto_backup_fs_file: GC-based cleanup, folder visibility, regression test#3683rrebollo wants to merge 5 commits into
rrebollo wants to merge 5 commits into
Conversation
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.
Summary
Port improvements from the v18 migration PR (#3619) back to v17.
Changes
F1+F2 — folder visibility and constrains
folderasrequired=Falsesofs_filerecords do not require a folder path_check_folder_required_for_methodconstrains to re-enforcefolderrequirement only forlocal/sftpmethodsfolderin form view whenmethod == 'fs_file'responsible_idonly whenmethod == 'fs_file'F3 — explicit GC chain in
db.backup.fs.file@api.depends('db_backup_id.days_to_keep', 'create_date')to_compute_is_expiredso recomputation is triggered correctlyunlink()override to ensurefs_attachmentGC stack (_fs_mark_for_gc) is triggered when a backup record is deletedget_fs_storage_filename()method (no longer called)F4 — cleanup() via GC, not rm_file
fs.rm_file()call incleanup()ir.attachment.unlink()→ autovacuum GCF5 — cleanup() reachable from action_backup()
successful_fsrecordset insideaction_backup()successful_fs.cleanup()aftersuper().action_backup()cleanup()was never called forfs_filerecords via the production cron pathF6 — regression test
test_action_backup_triggers_cleanupverifying the F5 fix end-to-endtest_ordinary_flowassertFalse(backup_config.folder)added to verify F1Docs + typos
:watypo in INSTALL.mdRelated: #3619 (v18), #3621 (v16)
Migration issue: #2752
@BinhexTeam T22571