feat: support overriding Docker image entrypoint - #15
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
There was a problem hiding this comment.
🟢 Ready to approve
The changes cleanly implement the requested entrypoint override semantics and include targeted tests for both explicit override and default inheritance behavior.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR adds support for explicitly overriding a Docker image’s entrypoint via DockerSandboxConfig, including the ability to clear an image-defined entrypoint by passing an empty list, while preserving the existing “inherit from image” behavior when the field is unset.
Changes:
- Added optional
entrypoint: Optional[Union[str, List[str]]]toDockerSandboxConfig. - Updated
DockerSandbox._create_container()to passentrypointthrough todocker-pyonly when explicitly set (including[]). - Added tests verifying JSON round-tripping for
entrypoint, explicit override behavior, and default inheritance behavior.
File summaries
| File | Description |
|---|---|
tests/test_sandbox.py |
Adds coverage for entrypoint override/clearing and default inheritance behavior. |
ms_enclave/sandbox/model/config.py |
Introduces the new entrypoint config field with documentation. |
ms_enclave/sandbox/boxes/docker_sandbox.py |
Conditionally forwards entrypoint to container creation when not None (supports []). |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Summary
entrypointfield toDockerSandboxConfig[]to clear an image entrypointValidation
pytest -q tests/test_sandbox.py::TestSandboxBasicFunctionality::test_docker_entrypoint_override tests/test_sandbox.py::TestSandboxBasicFunctionality::test_docker_entrypoint_inherits_image_by_defaultpre-commit run --files ms_enclave/sandbox/model/config.py ms_enclave/sandbox/boxes/docker_sandbox.py tests/test_sandbox.pyThis is required for EvalScope to run the pinned OmniDocBench v1.6 image as a reusable sandbox pool without maintaining a derived image.