[Part 1] Create a new Persistent Sandbox Handle#382
[Part 1] Create a new Persistent Sandbox Handle#382k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
Conversation
✅ Deploy Preview for agent-sandbox canceled.
|
|
/assign @igooch |
clients/python/agentic-sandbox-client/k8s_agent_sandbox/core/command_execution.py
Outdated
Show resolved
Hide resolved
clients/python/agentic-sandbox-client/k8s_agent_sandbox/core/command_execution.py
Outdated
Show resolved
Hide resolved
edd41c5 to
15cdd04
Compare
|
@SHRUTI6991: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
15cdd04 to
3d8c33a
Compare
igooch
left a comment
There was a problem hiding this comment.
Overall looks good.
Adding a note that we may need to update the pyproject.toml to pick up the new subdirectories when publishing the SDK.
clients/python/agentic-sandbox-client/k8s_agent_sandbox/commands/command_execution.py
Outdated
Show resolved
Hide resolved
clients/python/agentic-sandbox-client/k8s_agent_sandbox/sandbox.py
Outdated
Show resolved
Hide resolved
clients/python/agentic-sandbox-client/k8s_agent_sandbox/connector.py
Outdated
Show resolved
Hide resolved
clients/python/agentic-sandbox-client/k8s_agent_sandbox/connector.py
Outdated
Show resolved
Hide resolved
clients/python/agentic-sandbox-client/k8s_agent_sandbox/trace_manager.py
Outdated
Show resolved
Hide resolved
28984da to
8981b8c
Compare
|
/assign @janetkuo |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: igooch, SHRUTI6991 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/unassign @janetkuo |
|
/lgtm |
Working on #359
Description
This PR introduces the Resource Handle abstraction for the Python SDK. This is the first step in a multi-part refactor aimed at moving away from the current context-manager-centric design. A lot of the code is porting existing code into new classes.
The goal of this PR is to define the core classes and logic for managing Sandboxes as independent "handles." This allows for resource management that can persist beyond a single code block and provides a cleaner interface for future client-side updates.
Note: This PR does not affect the client yet
Key changes
SandboxClass: Introduced a persistent handle for resource lifecycle management.SandboxConnector: Connects, closes and sends request to server based on the connection config defined by the userCommandExecutorandFileSystem: Explicit classes for execution based on the type.Future Work
Checklist
[x] I have performed a self-review of my own code.
[x] Logic is documented via docstrings for the new handle classes.
[x] Initial unit tests for Handle state transitions are included.
Full Demo
https://www.youtube.com/watch?v=khMLrf-vO9Y