Skip to content

Support cloud pods in snapshot save cmd#250

Open
anisaoshafi wants to merge 6 commits into
mainfrom
devx-841-implement-snapshot-save-in-the-cloud
Open

Support cloud pods in snapshot save cmd#250
anisaoshafi wants to merge 6 commits into
mainfrom
devx-841-implement-snapshot-save-in-the-cloud

Conversation

@anisaoshafi
Copy link
Copy Markdown
Collaborator

@anisaoshafi anisaoshafi commented May 18, 2026

Added support for cloud pods in existing lstk snapshot save command.

image image

@anisaoshafi anisaoshafi changed the title Support snapshot save command (pod) Support snapshot save command for cloud pods May 18, 2026
@anisaoshafi anisaoshafi changed the title Support snapshot save command for cloud pods Support cloud pods in snapshot save cmd May 18, 2026
@anisaoshafi anisaoshafi marked this pull request as ready for review May 19, 2026 12:29
@anisaoshafi anisaoshafi requested a review from gtsiolis May 19, 2026 12:29
Copy link
Copy Markdown
Member

:fyi: Taking a look as soon as I resolve the license check issue, currently locked out of the CLI.

Copy link
Copy Markdown
Member

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Flawless UX. 💯

Comment thread internal/snapshot/save.go
return save(ctx, rt, containers, sink,
"Saving snapshot...",
func() {
sink.Emit(output.MessageEvent{Severity: output.SeveritySuccess, Text: fmt.Sprintf("Snapshot saved to %s", displayPath(dest, cwd, home))})
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.

issue: This conflates "pod" (the remote) with the snapshot name, reading snap1 as the pod name.

# BEFORE
✔︎ Snapshot saved to pod "snap1"

Closer to spec wording would be...

# AFTER
 Snapshot saved to pod:snap1

This way once we add support for s3:// and oras:// the same structure can be used.

# pod
Snapshot saved to pod:snap1

# s3
Snapshot saved to s3://bucket/snap1

# oras
Snapshot saved to oras://snap1

// cloud: prefix also catches cloud://
input: "cloud://my-pod",
wantRemoteErr: true,
// pod:// is also accepted
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: The spec so far defines pod: as a remote name, not a scheme. Do you suggest to add pod:// as also accepted prefix? See relevant discussion. Happy to consider adding it, but I think it's easier to start strict and loosen later if needed.

Comment thread internal/snapshot/save.go
Comment on lines +23 to +27
type PodSaveResult struct {
Version int
Services []string
Size int64
}
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 bootstrapping the save result output. 🙏 Adding some screenshots for future reference.

Saving Saved
Image Image

Comment thread internal/snapshot/save.go
Comment on lines +23 to +27
type PodSaveResult struct {
Version int
Services []string
Size int64
}
Copy link
Copy Markdown
Member

@gtsiolis gtsiolis May 19, 2026

Choose a reason for hiding this comment

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

suggestion: Kinda miss this when saving snapshot locally. 😁 Can be part of a follow up PR, and size can be skipped if it's not trivial to fetch. Thoughts?

# BEFORE
$ lstk snapshot save snap1
✔︎ Snapshot saved to ./snap1.zip

# AFTER
$ lstk snapshot save snap1
✔︎ Snapshot saved to ./snap1.zip
• Services: s3
• Size: 62.9 KB

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.

2 participants