Repository navigation
isb 3.2.0: every sandbox can expire, and isb serve reaps expired ones outside orgs too - #71
Merged
Merged
Conversation
… serve A sandbox spec gains `expires` (`24h`, `7d`, or `never`), and `isb create --expires`. isb keeps the deadline on the instance as user.isb.expires_at, and isb serve's reaper now deletes expired sandboxes in every incus project, plain ones in `default` included, not only orgs. - Default: 7 days for a plain sandbox, the org's sandbox_expiry with --org; applied by the CLI and isb rpc (Python, TypeScript) when isb creates the sandbox. The Rust API, isbx and the stack controller set none (EnsureOptions::default_expiry is None by default). - A lease: each isb up / create --ensure renews it, never shortens it, and never adds one to an instance without a deadline, so existing sandboxes are untouched. - isb ls shows EXPIRES; isb expiry NAME [--in D | --by D | --never]. - sandbox_create takes the spec's expires too; isb serve still refuses never and caps at 30 days. - Named volumes stay, as with isb rm. - To stay under the ratchet: ReadyCheck to spec/ready.rs, the name helpers to plan/names.rs, update_instance to sandbox/update.rs, sandbox_extend to daemon/sandboxes.rs, ls and prune to the CLI's instances.rs. Claude-Session: https://claude.ai/code/session_01SqR3QhYxi5hybLoCwjddgp
# Conflicts: # scripts/ratchet.txt
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.
Abandoned sandboxes now clean themselves up. Titan's disk kept hitting 85%: 41 plain sandboxes in incus'
defaultproject had no expiry, and isb serve's reaper only looked inside orgs.What changes
expires:on any sandbox spec (24h,7d,never), plusisb create --expires. It is stored asuser.isb.expires_at(unix seconds, ornever).--org, the org'ssandbox_expiry(24h). Applied by the CLI andisb rpc(the Python and TypeScript SDKs) when isb creates the sandbox.isb up/create --ensurerenews the deadline. It never shortens a later one, and never adds one to an instance that has none.isb rm.isb lsgains an EXPIRES column, andisb expiry NAME --in D | --by D | --neverchanges it.sandbox_createalso reads the spec'sexpires. Through the daemon,neveris still refused and the 30-day cap stays.Not affected
updoes not add one.isb serveor incus upgrade does not touch existing sandboxes either.Verified
scripts/check.sh: fmt, clippy-D warnings, the tests, docs, the ratchet. SDK types regenerated.isb plan --exit-codestaying quiet, sandboxes from the old isb, and bad values refused.isb serve. It reaped expired sandboxes indefaultand in an org, and kept thenever, 7-day and no-deadline ones and the named volume.Before relying on it
Tool containers that a script recreates (for example
sume-cli) needexpires: neverin their spec.https://claude.ai/code/session_01SqR3QhYxi5hybLoCwjddgp