Skip to content

fix: pre-clean snapshot dir before store#777

Merged
vfusco merged 1 commit into
next/2.0from
fix/cleanup-on-store
May 19, 2026
Merged

fix: pre-clean snapshot dir before store#777
vfusco merged 1 commit into
next/2.0from
fix/cleanup-on-store

Conversation

@mpolitzer
Copy link
Copy Markdown

@mpolitzer mpolitzer commented May 11, 2026

Safeguard against a restart after a partial store.

@mpolitzer mpolitzer self-assigned this May 11, 2026
@mpolitzer mpolitzer requested review from renatomaia and vfusco May 11, 2026 17:55
@mpolitzer mpolitzer marked this pull request as ready for review May 11, 2026 17:55
@vfusco vfusco added this to the 2.0.0 milestone May 12, 2026
@vfusco vfusco requested a review from Copilot May 12, 2026 14:06
Copy link
Copy Markdown

Copilot AI left a comment

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 makes snapshot creation resilient to restarts after a partial snapshot write by pre-cleaning the target snapshot directory before invoking the machine snapshot store.

Changes:

  • Pre-remove any existing snapshot directory at the intended output path before creating a new snapshot.
  • Add a unit test intended to cover retrying snapshot creation when the target directory already exists.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
internal/advancer/advancer.go Pre-cleans the snapshot output path before calling CreateSnapshot to avoid failures on existing directories.
internal/advancer/advancer_test.go Adds a test case for handling a pre-existing (stale) snapshot directory.

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

Comment thread internal/advancer/advancer.go Outdated
Comment thread internal/advancer/advancer_test.go
@mpolitzer mpolitzer force-pushed the fix/cleanup-on-store branch 3 times, most recently from e4d007b to 79d04d7 Compare May 15, 2026 15:31
@mpolitzer mpolitzer force-pushed the fix/cleanup-on-store branch from 79d04d7 to 70d3d0b Compare May 15, 2026 17:09
@github-project-automation github-project-automation Bot moved this from Todo to Waiting Merge in Rollups SDK May 19, 2026
@vfusco vfusco merged commit 70d3d0b into next/2.0 May 19, 2026
8 checks passed
@vfusco vfusco deleted the fix/cleanup-on-store branch May 19, 2026 17:22
@github-project-automation github-project-automation Bot moved this from Waiting Merge to Done in Rollups SDK May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants