Skip to content

[Feature] Support no volume mount with Sandbox Server and distributed K8S deployment#36

Merged
rayrayraykk merged 9 commits intoagentscope-ai:mainfrom
rayrayraykk:dev/k8s_volume
Sep 4, 2025
Merged

[Feature] Support no volume mount with Sandbox Server and distributed K8S deployment#36
rayrayraykk merged 9 commits intoagentscope-ai:mainfrom
rayrayraykk:dev/k8s_volume

Conversation

@rayrayraykk
Copy link
Copy Markdown
Member

@rayrayraykk rayrayraykk commented Sep 3, 2025

Description

  1. Support no volume mount with Sandbox Server
  2. Support distributed K8S deployment

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Engine
  • Sandbox
  • Documentation
  • Tests
  • CI/CD

Checklist

  • Pre-commit hooks pass
  • Tests pass locally
  • Documentation updated (if needed)
  • Ready for review

Copilot AI review requested due to automatic review settings September 3, 2025 03:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for running Sandbox Server without volume mounting by making the default_mount_dir configuration optional and updating the initialization logic to handle cases where no mount directory is specified.

  • Removes the requirement for default_mount_dir to be set in the validation
  • Updates the SandboxManager initialization to create a default config when none is provided
  • Adds conditional logic throughout the codebase to handle operations when no mount directory exists

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/agentscope_runtime/sandbox/model/manager_config.py Removes validation requiring default_mount_dir and removes the default config constant
src/agentscope_runtime/sandbox/model/__init__.py Removes export of the deleted DEFAULT_LOCAL_MANAGER_CONFIG constant
src/agentscope_runtime/sandbox/manager/sandbox_manager.py Updates initialization logic to handle optional config and adds conditional volume mounting throughout container lifecycle

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/agentscope_runtime/sandbox/manager/sandbox_manager.py

This comment was marked as outdated.

@rayrayraykk rayrayraykk requested a review from Copilot September 3, 2025 11:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables the Sandbox Server to operate without volume mounting, allowing for containers to run without persistent local storage. The changes remove mandatory volume mounting requirements and add support for dynamic IP resolution in containerized environments.

  • Removes the requirement for default_mount_dir to be set, making it optional
  • Updates container creation logic to handle cases with no volume mounting
  • Adds dynamic IP resolution for container connectivity instead of hardcoded localhost

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/agentscope_runtime/sandbox/model/manager_config.py Removes validation requiring default_mount_dir and removes default config constant
src/agentscope_runtime/sandbox/model/init.py Updates exports to remove the deleted default config constant
src/agentscope_runtime/sandbox/manager/server/app.py Adds logging configuration setup functionality
src/agentscope_runtime/sandbox/manager/sandbox_manager.py Updates container creation to support no volume mounting and dynamic IP resolution
src/agentscope_runtime/sandbox/manager/container_clients/kubernetes_client.py Enhances Kubernetes client with node IP detection and proper service creation
src/agentscope_runtime/sandbox/manager/container_clients/docker_client.py Updates Docker client to return IP information for consistency

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/agentscope_runtime/sandbox/manager/sandbox_manager.py
Comment thread src/agentscope_runtime/sandbox/manager/sandbox_manager.py
@rayrayraykk rayrayraykk changed the title [Feature] Support no volume mount with Sandbox Server [Feature] Support no volume mount with Sandbox Server and distributed K8S deployment Sep 3, 2025
@rayrayraykk rayrayraykk added the enhancement New feature or request label Sep 3, 2025
@rayrayraykk rayrayraykk merged commit dd0b086 into agentscope-ai:main Sep 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants