Skip to content

[18.0] [MIG] auto_backup_fs_file#3619

Open
rrebollo wants to merge 9 commits into
OCA:18.0from
BinhexTeam:18.0-mig-auto_backup_fs_file
Open

[18.0] [MIG] auto_backup_fs_file#3619
rrebollo wants to merge 9 commits into
OCA:18.0from
BinhexTeam:18.0-mig-auto_backup_fs_file

Conversation

@rrebollo

@rrebollo rrebollo commented May 20, 2026

Copy link
Copy Markdown
Contributor

Standard migration from v17 (closes #3047).

Additionally, the following bugs found during QA were fixed:

  • Hide folder/responsible_id when method=fs_file (400b8e3e) — The folder and responsible_id fields were visible and folder was required even when the backup method was fs_file, which was confusing. Now folder is hidden and non-required when method='fs_file'.

  • Delegate file deletion to fs_attachment GC (2860b8a5) — cleanup() was calling fs.rm_file() directly on the storage backend, bypassing the fs_attachment garbage collector. Now deletion is delegated to the standard GC pipeline (ir.attachment.unlink()_fs_mark_for_gc() → autovacuum), ensuring transactional safety.

  • Fix typos (686b6b18) — License header had malformed []( ) brackets; INSTALL.md had a trailing :wa.

@BinhexTeam T22572

@OCA-git-bot OCA-git-bot added series:18.0 mod:auto_backup_fs_file Module auto_backup_fs_file labels May 20, 2026
@rrebollo
rrebollo marked this pull request as draft May 20, 2026 13:32
@rrebollo
rrebollo force-pushed the 18.0-mig-auto_backup_fs_file branch from 06fe630 to 9067782 Compare May 20, 2026 13:35
@rrebollo
rrebollo marked this pull request as ready for review May 20, 2026 13:45
@rrebollo rrebollo changed the title 18.0 mig auto backup fs file [18.0] [MIG] auto_backup_fs_file May 20, 2026
@rrebollo
rrebollo force-pushed the 18.0-mig-auto_backup_fs_file branch from 9067782 to 8665d1e Compare May 20, 2026 13:57
rrebollo and others added 8 commits June 10, 2026 18:44
…file

- Add invisible='method == "fs_file"' to folder field in form view
- Add invisible='method != "fs_file"' to responsible_id field
- Override folder to required=False; add constrains for local/sftp only
- Add test assertion that folder is unset for fs_file configs
… stack

- Remove direct fs.rm_file() call from cleanup(); rely on unlink() + GC
- Add unlink() override on db.backup.fs.file to explicitly cascade ir.attachment
- Add missing @api.depends on _compute_is_expired
- Remove dead get_fs_storage_filename() method
- Add test assertion that ir.attachment is gone after cleanup
…ed cleanup

- ROADMAP.md: folder field is hidden and non-required when method=fs_file
- USAGE.md: new section explaining cleanup and deferred file deletion via
  fs_attachment garbage collector
- CONTEXT.md: add paragraph on GC-based cleanup mechanism
@rrebollo
rrebollo force-pushed the 18.0-mig-auto_backup_fs_file branch from 8665d1e to ec466af Compare June 10, 2026 22:57
…on_backup

The parent action_backup() builds `successful` exclusively from local/sftp
records. When successful.cleanup() was called, the cleanup() override filtered
self for method=='fs_file' and received an empty recordset — making fs_file
cleanup dead code in the production backup flow.

Fix: track successfully completed fs_file backup configs in action_backup()
and call cleanup() on them explicitly after super().action_backup().

Add test_action_backup_triggers_cleanup to validate cleanup fires through
the production call path (action_backup) not just direct cleanup() calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:auto_backup_fs_file Module auto_backup_fs_file series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migration to version 18.0

3 participants