Skip to content

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

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

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

copy-pr-bot Bot commented May 12, 2026

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
Copy link
Copy Markdown

Thank you for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text:


I have read the DCO document and I hereby sign the DCO.


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot.

@github-actions github-actions Bot closed this May 12, 2026
@drew drew reopened this May 12, 2026
Sign up for free to 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.

2 participants