refactor(sandbox): remove unused pod_template field from CreateSandbox RPC#522
Merged
refactor(sandbox): remove unused pod_template field from CreateSandbox RPC#522
Conversation
…x RPC The pod_template field on SandboxTemplate was fully implemented on the server side but never populated by any caller (CLI, SDK, or tests). Remove the field, its validation, the inject_pod_template() code path, and associated dead helper functions to reduce maintenance surface. Field number 8 is reserved in the proto to prevent accidental reuse.
No backwards compatibility concern — remove the reserved field number and name to keep the proto clean.
johntmyers
approved these changes
Mar 21, 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.
Summary
Remove the
pod_templatefield fromSandboxTemplatein theCreateSandboxRPC. The field was fully implemented server-side but never populated by any caller — not the CLI, the Python SDK, or any test. This eliminates ~320 lines of unreachable code.Changes
pod_templatefield (tag 8), reserved field number and name to prevent reusepod_templatesize validation and updated comment onMAX_TEMPLATE_STRUCT_SIZEinject_pod_template(),apply_gpu_to_container(),update_container_env(), thepod_templateearly-return branch insandbox_template_to_k8s(), and 2 unit tests (gpu_sandbox_updates_custom_pod_template,host_aliases_injected_in_custom_pod_template)pod_templatestruct fieldpod_templateoverridesGPU sandboxes, TLS, host aliases, env injection, and supervisor sideloading all continue to work through the default
sandbox_template_to_k8scode path, which handles these concerns independently. All 5 GPU-specific tests pass.Testing
mise run pre-commitpassesopenshell-servertests passcargo test -p openshell-server gpu)Checklist