Skip to content

fix(storage): exclude watch control files from backups - #4149

Open
wdsjjs wants to merge 1 commit into
volcengine:mainfrom
wdsjjs:fix/exclude-watch-control-files-from-backup
Open

fix(storage): exclude watch control files from backups#4149
wdsjjs wants to merge 1 commit into
volcengine:mainfrom
wdsjjs:fix/exclude-watch-control-files-from-backup

Conversation

@wdsjjs

@wdsjjs wdsjjs commented Aug 20, 2026

Copy link
Copy Markdown

Description

Fix backup and restore round trips when a workspace contains watch tasks.

ov backup previously included .watch_tasks.json and its temporary/backup variants, while restore correctly rejects these internal control files. This produced backup packages that could not be restored.

Watch control files are now excluded from backups. Restore-side validation remains unchanged.

Related Issue

Fixes #4139

Changes Made

  • Exclude watch task control files from _backup_entries().
  • Keep instance-local scheduler state out of portable backup packages.
  • Add regression coverage to verify that the files are absent from both the archive and manifest, and that the backup can be restored.

Testing

PYTHONPATH=. .venv/bin/python -m pytest --no-cov \
  tests/misc/test_ovpack_import_policy.py -v

.venv/bin/ruff format --check \
  openviking/storage/ovpack/operations.py \
  tests/misc/test_ovpack_import_policy.py

.venv/bin/ruff check \
  openviking/storage/ovpack/operations.py \
  tests/misc/test_ovpack_import_policy.py

git diff --check

@hachimin-wh

Copy link
Copy Markdown
Contributor

The backup-side exclusion is correct and the test covers the full
.watch_tasks.json / .bak / .tmp triple. One note from the issue author: this is
suggested fix 1 only — packs already produced on instances with watch tasks remain
unrestorable; suggested fix 2 (restore skips the control file with a log instead of failing
the whole pack) would recover them, which #4150 adds on top of the same backup change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

[Bug]: Backup packs .watch_tasks.json but restore rejects it — backup/restore round-trip broken whenever a watch task exists

2 participants