Repository navigation
feat(sandbox): raw mode for SandboxNextProvider (K8s manifest passthrough) - #1345
Merged
Merged
Conversation
zhongwen666
approved these changes
Sep 2, 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.
Closes #1344
Summary
Add a raw mode to
SandboxNextProvider: when the E2B link finds no READY template in the DB, the provider renders a full BatchSandbox CRD manifest and passes it through to the SandboxManager Control HTTP API as a JSON string in the bodyrawfield — a flexible escape hatch for anything the structuredresource_specfields cannot express.Changes
rock/admin/service/e2b_service.py: when no READY template matches, cleartemplate_idand setextended_params["use_raw"]="true"(request image becomes the container image).rock/sandbox/operator/remote/providers/sandbox_next_provider.py:submitbranches into template / raw / resource_spec paths (template_idwins overuse_raw); raw path renders viaK8sTemplateLoader.build_manifestand sends{"raw": "<manifest json>"}; port_mapping is read from the templateportsinstead of being hardcoded.rock/config.py: newRemoteOperatorConfig.templatesfield (same structure asK8sConfig.templates).rock/sandbox/operator/remote/constants.py:EXT_USE_RAW/EXT_USE_RAW_ENABLEDextended_params keys, following the K8spool_name/template_nameprecedent.rock/utils/format.py:normalize_memory_to_k8sfor rendering K8s-style quantities (K8s provider keeps its own copy untouched).RemoteOperatorConfig.templatesYAML example indocs/proposals/remote-operator.md.Test plan
tests/unit/sandbox/operator/remote/,tests/unit/admin/service/,tests/unit/utils/test_format.py)