Repository navigation
feat(adapters): pause/resume on agent-sandbox warm pools with GKE Pod Snapshots - #136
Merged
Merged
Conversation
… Snapshots A pool with both warmPool and podSnapshotPolicy claims a running warm pod and pauses it into a GKE pod snapshot that frees its node resources, so fast starts and checkpointing pauses combine. Snapshots and fork are not offered there: a claimed pod is already running, so nothing can be restored into it. The claim controller rewrites the claimed Sandbox's pod template from the template and the claim on every pass, so the snapshot group and the checkpoint to restore go into the claim's additionalPodMetadata, the adapter's annotations onto the claim, and only the operating mode onto the Sandbox. A pause writes the claim first and suspends last; undoing a pause or suspending an unverified resume sets the mode first. A paused claim reads its state from its Sandbox, follows the controller when it adopts a new one, and never fails the whole List. Health checks the warm pool's template runs under a RuntimeClass, and a create the controller refuses for its label domain says how to allow it. Claims are polled every 100 ms: a create from a warm pool took 110 ms on kind, down from 510 ms. Tested with the fake (whose claim controller now adopts separate warm Sandboxes, checks label domains, can lag and can refuse patches) and, by hand, against agent-sandbox v1.0.12 on kind with a stand-in for GKE's snapshot controller. Not run on GKE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jalil <reachjalil@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fast start and snapshot-backed pause on GKE, together. Until now the
agent-sandboxadapter refusedwarmPoolcombined withpodSnapshotPolicy, so a pool had either sub-second warm starts or checkpointing pauses, never both.What changes
lifecycle.pause-resumeandlifecycle.pause-checkpoint.additionalPodMetadata. The policy checks from feat(adapters): snapshots, fork and pause/resume on GKE for agent-sandbox #131 still apply.ps-namego through the claim, the adapter's annotations go on the claim, and onlyoperatingModeis set on the Sandbox.runtimeClassName.differently.devmust be in agent-sandbox'sallowed-label-domains. A create refused for that names the fix.Verification
go test): the fake claim controller now behaves like the real one.gvisorwith therunchandler), by hand:differently.devlabel is refused until it's allowlisted.ps-nameset on the claim reaches the Sandbox's template, and so does its removal.ps-name, which is what GKE restores from.podsnapshot.gke.ioCRDs and a loop that marks each trigger's PodSnapshot ready:pausedby both Get and List.make verifyand the site build pass.Not run: GKE itself, meaning real checkpoints, restores and gVisor.
TestLivePodSnapshotsis still unrun.🤖 Generated with Claude Code