Skip to content

Replace the local snapshot extension .zip to .snapshot#304

Open
anisaoshafi wants to merge 2 commits into
mainfrom
devx-848-replace-snapshot-file-extension
Open

Replace the local snapshot extension .zip to .snapshot#304
anisaoshafi wants to merge 2 commits into
mainfrom
devx-848-replace-snapshot-file-extension

Conversation

@anisaoshafi

@anisaoshafi anisaoshafi commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Use .snapshot extension for saving snapshots locally.
image
cc @gtsiolis

@anisaoshafi anisaoshafi marked this pull request as ready for review June 12, 2026 13:01

@gtsiolis gtsiolis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Left some comments below we discuss async or sync!


const (
snapshotExt = ".snapshot" // user-facing extension for local snapshots
legacySnapshotExt = ".zip" // accepted on load for backward compatibility

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

praise: Thanks for adding this! 🙏

Comment thread cmd/snapshot.go
lstk snapshot load my-baseline # loads ./my-baseline or ./my-baseline.zip
lstk snapshot load ./checkpoint.zip # loads from explicit path
lstk snapshot load pod:my-baseline # loads from LocalStack Cloud
lstk snapshot load my-baseline # loads ./my-baseline or ./my-baseline.snapshot

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question: Couldn't find a better line to add this comment, but loading an invalid file returns an error. Could we update that and possibly remove the file extension reference?

Image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, will change 🙏🏼

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fyi, this error was returned from emulator in this line, we only prefix it with load failed for service:.
I modified it to look like this. let me know if it needs more tweaking. thank you!
image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perfect, this matches the error pattern and style we introduced for other cases, too. 💯

Comment thread cmd/snapshot.go
@anisaoshafi anisaoshafi force-pushed the devx-848-replace-snapshot-file-extension branch 2 times, most recently from f297e58 to 75a6d5b Compare June 12, 2026 15:18
@anisaoshafi anisaoshafi force-pushed the devx-848-replace-snapshot-file-extension branch from 75a6d5b to 2037aa1 Compare June 15, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants