feat: add support for per-sandbox idle timeout option#7
Merged
Conversation
Adds an optional idle_timeout param to Sandbox.create() (default 900) that is forwarded in the request body alongside max_lifetime, and stores the resolved value on the instance from both the create and get responses. Also routes Sandbox.get() through an optional management_endpoint so status checks reach the correct host on production clusters, falling back to api_host when omitted. Mirrors the Node.js SDK changes in adobe/aio-lib-sandbox#6. RUNNER-9437
Adds unit tests for the default idle_timeout/max_lifetime sent in the create body, an explicit idle_timeout forwarded in the body, idle_timeout stored on the instance from create and get responses, and Sandbox.get() routing through a supplied management_endpoint. Mirrors the Node.js SDK test additions in adobe/aio-lib-sandbox#6. RUNNER-9437
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
MichaelGoberling
approved these changes
Jun 10, 2026
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.
Description
idle_timeoutoption to sandbox-creation payloadSandbox.get()through the optionalmanagement_endpointso status checks reach the correct host on production clustersREADME.mdto document sandbox lifetime modelRelated Issue
Motivation and Context
The sandbox-creation API now support clients setting a per-sandbox idle timeout alongside the max lifetime option. This change exposes that capability to clients in the SDK.
How Has This Been Tested?
Local shell session running test script...
Screenshots (if appropriate):
N/A
Types of changes
Checklist: