Skip to content

Remvoe extra files when restoring snapshots#25

Open
kerthcet wants to merge 2 commits into
InftyAI:mainfrom
kerthcet:fix/remove-extra-files
Open

Remvoe extra files when restoring snapshots#25
kerthcet wants to merge 2 commits into
InftyAI:mainfrom
kerthcet:fix/remove-extra-files

Conversation

@kerthcet

Copy link
Copy Markdown
Member

What this PR does / why we need it

Which issue(s) this PR fixes

Fixes #

Special notes for your reviewer

Does this PR introduce a user-facing change?


Signed-off-by: kerthcet <kerthcet@gmail.com>
Copilot AI review requested due to automatic review settings June 30, 2026 20:52
@InftyAI-Agent InftyAI-Agent added needs-triage Indicates an issue or PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 30, 2026
@kerthcet

Copy link
Copy Markdown
Member Author

/kind bug

@InftyAI-Agent InftyAI-Agent added bug Categorizes issue or PR as related to a bug. and removed do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Jun 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the snapshot restore path in SnapshotManager to make restores “clean” by removing files/directories in the destination that are not present in the snapshot, and adds a regression test to validate that behavior.

Changes:

  • Add a post-restore cleanup phase that deletes “extra” entries in the restore destination directory.
  • Document the new restore semantics in restore_tree.
  • Add a test ensuring extras are removed after a restore.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sandd/src/snapshot/manager.rs Outdated
Comment thread sandd/src/snapshot/manager.rs
Signed-off-by: kerthcet <kerthcet@gmail.com>
@kerthcet kerthcet force-pushed the fix/remove-extra-files branch from ef3e6ea to f938dfb Compare June 30, 2026 21:19
@kerthcet

Copy link
Copy Markdown
Member Author

/lgtm

@InftyAI-Agent InftyAI-Agent added the lgtm Looks good to me, indicates that a PR is ready to be merged. label Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bug Categorizes issue or PR as related to a bug. lgtm Looks good to me, indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants