Skip to content

refactor(sandbox): remove unused pod_template field from CreateSandbox RPC#522

Merged
drew merged 2 commits intomainfrom
remove-pod-template/an
Mar 21, 2026
Merged

refactor(sandbox): remove unused pod_template field from CreateSandbox RPC#522
drew merged 2 commits intomainfrom
remove-pod-template/an

Conversation

@drew
Copy link
Collaborator

@drew drew commented Mar 21, 2026

Summary

Remove the pod_template field from SandboxTemplate in the CreateSandbox RPC. 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

  • proto/datamodel.proto: Removed pod_template field (tag 8), reserved field number and name to prevent reuse
  • openshell-server/grpc.rs: Removed pod_template size validation and updated comment on MAX_TEMPLATE_STRUCT_SIZE
  • openshell-server/sandbox/mod.rs: Removed inject_pod_template(), apply_gpu_to_container(), update_container_env(), the pod_template early-return branch in sandbox_template_to_k8s(), and 2 unit tests (gpu_sandbox_updates_custom_pod_template, host_aliases_injected_in_custom_pod_template)
  • openshell-core/proto/openshell.datamodel.v1.rs: Removed generated pod_template struct field
  • architecture/sandbox-custom-containers.md: Removed reference to pod_template overrides

GPU sandboxes, TLS, host aliases, env injection, and supervisor sideloading all continue to work through the default sandbox_template_to_k8s code path, which handles these concerns independently. All 5 GPU-specific tests pass.

Testing

  • mise run pre-commit passes
  • All 177 openshell-server tests pass
  • All 5 GPU tests pass (cargo test -p openshell-server gpu)
  • E2E tests not applicable (field was never wired to any caller)

Checklist

  • Follows Conventional Commits
  • Architecture docs updated

…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.
@drew drew requested a review from a team as a code owner March 21, 2026 15:28
@drew drew self-assigned this Mar 21, 2026
No backwards compatibility concern — remove the reserved field number
and name to keep the proto clean.
@drew drew added the test:e2e Requires end-to-end coverage label Mar 21, 2026
@drew drew merged commit ef196db into main Mar 21, 2026
12 checks passed
@drew drew deleted the remove-pod-template/an branch March 21, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants