Skip to content

feat(snapshot): support public snapshots api on Kubernetes runtime#837

Merged
ninan-nn merged 3 commits intoalibaba:mainfrom
fengcone:feature/public-k8s-snapshot
May 7, 2026
Merged

feat(snapshot): support public snapshots api on Kubernetes runtime#837
ninan-nn merged 3 commits intoalibaba:mainfrom
fengcone:feature/public-k8s-snapshot

Conversation

@fengcone
Copy link
Copy Markdown
Collaborator

@fengcone fengcone commented May 6, 2026

Summary

  • Implement Kubernetes-backed public snapshot creation by creating and
    watching SandboxSnapshot CRs from the lifecycle server. Persist the
    selected restore image, support restart recovery for in-progress
    snapshots, and require the source sandbox to be Running before accepting
    snapshot creation.

  • Separate public snapshot image tags from internal pause/resume tags:
    pause/resume snapshots keep snap-gen via BatchSandbox ownerReference,
    while server-managed snapshots use stable snapshot-id-derived tags.

  • Update API/docs to clarify Kubernetes snapshot delete semantics, add
    focused server/controller tests, and include a manual K8s snapshot debug
    runner for create, snapshot, restore, and cleanup verification.

Testing

  • Not run (explain why)
  • Unit tests
  • Integration tests
  • e2e / manual verification

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

fengcone added 2 commits May 6, 2026 15:33
Implement Kubernetes-backed public snapshot creation by creating and
watching SandboxSnapshot CRs from the lifecycle server. Persist the
selected restore image, support restart recovery for in-progress
snapshots, and require the source sandbox to be Running before accepting
snapshot creation.

Separate public snapshot image tags from internal pause/resume tags:
pause/resume snapshots keep snap-gen<N> via BatchSandbox ownerReference,
while server-managed snapshots use stable snapshot-id-derived tags.

Update API/docs to clarify Kubernetes snapshot delete semantics, add
focused server/controller tests, and include a manual K8s snapshot debug
runner for create, snapshot, restore, and cleanup verification.
# Conflicts:
#	server/tests/test_snapshot_runtime_factory.py
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 64edfc3a3a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/opensandbox_server/services/k8s/snapshot_runtime.py Outdated
Comment thread server/opensandbox_server/services/k8s/snapshot_runtime.py
@fengcone fengcone added component/k8s For kubernetes runtime component/server documentation Improvements or additions to documentation labels May 6, 2026
Comment thread server/opensandbox_server/services/k8s/snapshot_runtime.py
Copy link
Copy Markdown
Collaborator

@ninan-nn ninan-nn left a comment

Choose a reason for hiding this comment

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

Server related code reviewed, LGTM. Server tests should be fixed.

Copy link
Copy Markdown
Collaborator

@Pangjiping Pangjiping left a comment

Choose a reason for hiding this comment

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

LGTM

@jwx0925
Copy link
Copy Markdown
Collaborator

jwx0925 commented May 7, 2026

@codex review

@ninan-nn ninan-nn merged commit 4d70daf into alibaba:main May 7, 2026
47 of 53 checks passed
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

component/k8s For kubernetes runtime component/server documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants