feat: sandbox auto-pause interval support in SDKs and CLI#58
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 91 files
Not reviewed (too large): openapi-specs/api.json (~3,618 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
|
All contributors have signed the CLA. ✅ Thank you! |
There was a problem hiding this comment.
All reported issues were addressed across 20 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
3 issues found across 29 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="sdk-ruby/lib/daytona/daytona.rb">
<violation number="1" location="sdk-ruby/lib/daytona/daytona.rb:212">
P2: Ruby still allows the documented `ephemeral: true, auto_pause_interval: 60` path through this validation because `ephemeral: true` does not set `auto_delete_interval` to `0` when that field is omitted. Checking `params.ephemeral` here as well would make the new client-side guard match the added spec and the Python behavior.</violation>
</file>
<file name="sdk-go/pkg/daytona/client.go">
<violation number="1" location="sdk-go/pkg/daytona/client.go:460">
P2: Linked sandbox creates can still send a non-zero `AutoPauseInterval` without being rejected client-side, because this check only recognizes ephemeral sandboxes via an explicit `AutoDeleteInterval == 0`. Since `LinkedSandbox` is documented as requiring an ephemeral sandbox, considering it in the same validation would keep the SDK fail-fast behavior consistent for that create path.</violation>
</file>
<file name="cli/cmd/sandbox/create.go">
<violation number="1" location="cli/cmd/sandbox/create.go:91">
P2: `daytona sandbox create --auto-delete 0` can still bypass this validation because the new check only runs when `--auto-pause` is explicitly provided. For ephemeral sandboxes, consider handling `autoDeleteFlag == 0` outside the `Changed("auto-pause")` branch so implicit server auto-pause defaults are disabled or rejected consistently.</violation>
</file>
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
2bf89ae to
84d88ff
Compare
Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
…d MCP Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
…andboxes Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
84d88ff to
1422b2d
Compare
What
autoPauseInterval/auto_pause_intervalcreate parametersetAutoPauseInterval()/set_auto_pause_interval()on the Sandbox object (Ruby:auto_pause_interval=)autoPauseIntervalexposed on sandbox DTO mappingsautoStopInterval(at most one non-zero)daytona sandbox create --auto-pause <minutes>(mutually exclusive with--auto-stop); interval flags are now only sent when explicitly set, so server-side class-aware defaults apply (pause-capable classes default to auto-pause 60 min, containers keep auto-stop 15 min). MCPcreate_sandboxtool getsautoPauseIntervaltoo.openapi-specs/api.jsonupdated + allapi-client*regenerated (newsetAutoPauseIntervaloperation).Behavior notes
linux-vm,windows) may enable auto-pause; server returns 422 otherwise.Summary by cubic
Adds auto-pause interval support across SDKs and the CLI so sandboxes can automatically pause after idle time. Introduces create-time
autoPauseInterval, a per-sandboxsetAutoPauseIntervalendpoint/method, enforces exclusivity with auto-stop, and blocks auto-pause for ephemeral sandboxes.New Features
autoPauseIntervalin create params;setAutoPauseInterval()(Ruby:auto_pause_interval=); exposed on sandbox models and list items; validation (non‑negative; mutually exclusive withautoStopInterval; disallowed for ephemeral).daytona sandbox create --auto-pause <minutes>; mutually exclusive with--auto-stop; only sends interval flags when set; blocks auto-pause for ephemeral. MCPcreate_sandboxaddsautoPauseInterval.setAutoPauseInterval; allapi-client*variants regenerated.Bug Fixes
auto_delete_intervalto 0 for ephemeral sandboxes.Written for commit 1422b2d. Summary will update on new commits.