Skip to content

fix(k8s): respect template OPENSHELL_SANDBOX_COMMAND instead of overwriting - #1326

Closed
Arnonrgo wants to merge 1 commit into
NVIDIA:mainfrom
Arnonrgo:fix/respect-template-sandbox-command
Closed

fix(k8s): respect template OPENSHELL_SANDBOX_COMMAND instead of overwriting#1326
Arnonrgo wants to merge 1 commit into
NVIDIA:mainfrom
Arnonrgo:fix/respect-template-sandbox-command

Conversation

@Arnonrgo

Copy link
Copy Markdown
Contributor

Summary

  • apply_required_env() unconditionally overwrites OPENSHELL_SANDBOX_COMMAND with "sleep infinity"
  • Custom sandbox images cannot specify their own entrypoint command
  • Use upsert_env_if_absent() so template values take precedence

Changes

  • Add upsert_env_if_absent() helper that only inserts if the env var doesn't already exist
  • Change OPENSHELL_SANDBOX_COMMAND injection to use the new helper

Testing

  • Unit test: existing value is preserved (not overwritten)
  • Unit test: absent value gets default "sleep infinity"
  • Unit test: full apply_required_env preserves template command
  • cargo check -p openshell-driver-kubernetes passes

…riting
apply_required_env() unconditionally overwrites OPENSHELL_SANDBOX_COMMAND
with "sleep infinity", ignoring any value set in the sandbox template's
environment list. This prevents custom sandbox images from specifying
their own entrypoint command.
Use upsert_env_if_absent() so the template's value takes precedence,
falling back to "sleep infinity" only when no command is configured.
@copy-pr-bot

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown

Thank you for your interest in contributing to OpenShell, @Arnonrgo.

This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer.

To get vouched:

  1. Open a Vouch Request discussion.
  2. Describe what you want to change and why.
  3. Write in your own words — do not have an AI generate the request.
  4. A maintainer will comment /vouch if approved.
  5. Once vouched, open a new PR (preferred) or reopen this one after a few minutes.

See CONTRIBUTING.md for details.

@github-actions

github-actionsBot commented May 12, 2026

Copy link
Copy Markdown

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@drewdrew reopened this May 12, 2026
@maxamillion

Copy link
Copy Markdown
Collaborator

@Arnonrgo your PR looks good but unfortunately now there's a conflict and we still need the DCO signing. Thank you! :)

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Arnonrgo@maxamillion@drew@johntmyers