You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Expose SandboxClaim lifetime in the Kubernetes harness adapter #4169
Is your feature request related to a problem? Please describe.
The Kubernetes harness adapter cannot configure a SandboxClaim lifetime. At a4306d63, the lower-level CreateSandboxOptions already accepts shutdownAfterSeconds, and K8sHelper writes spec.lifecycle.shutdownTime with shutdownPolicy: Delete when that value is non-null. KubernetesSandboxClient.create() never supplies it, and the harness options/spec do not expose it.
If the application exits before shutdown(), a claim created through the harness has no configured lifetime and can remain until explicitly deleted.
Describe the solution you'd like
Expose an optional positive shutdownAfterSeconds on KubernetesSandboxClientOptions and KubernetesFilesystemSpec, and carry it through option copying, per-call merging and claim creation. Keep the default null so existing long-running tasks are unaffected. A null per-call value should inherit the client template.
The lifetime should start at creation and remain unchanged on resume. Document that expiry can remove a workspace without a snapshot.
Describe alternatives you've considered
Applications can use the lower-level SDK directly or run an external claim sweeper. Passing through the existing SDK option would make the same opt-in behavior available to harness users.
Additional context
Version: 2.1.0-SNAPSHOT. Related to the lifecycle portion of #2944; sandbox reuse, idle-time eviction and multi-tenant concurrency remain separate concerns. Validation uses a loopback Kubernetes API to inspect the actual claim request; controller-side expiry has not been tested against a cluster.
Activity
XuXcode commentedon Nov 18, 2026
I'd like to work on this issue. Is it still available?
ningmao-hlyz commentedon Nov 19, 2026
already done