Skip to content

Stop dev mode from dropping most of --env-file - #80

Open
vohonen wants to merge 1 commit into
longtermrisk:mainfrom
vohonen:fix/dev-mode-env-passthrough
Open

Stop dev mode from dropping most of --env-file#80
vohonen wants to merge 1 commit into
longtermrisk:mainfrom
vohonen:fix/dev-mode-env-passthrough

Conversation

@vohonen

@vohonen vohonen commented Aug 18, 2026

Copy link
Copy Markdown

ow ssh --env-file reads a .env and hands it to the provider, but in dev mode
start_worker rebuilt env from os.environ using a five-var credential list,
replacing whatever the caller passed. Anything outside that list never reached
the pod: WANDB_API_KEY, WANDB_PROJECT and MAX_JOBS all vanished silently,
so --env-file looked like it worked while delivering almost nothing.

The credential list still gets forwarded from the caller's shell, but values the
caller passed explicitly now survive and take precedence over the shell.

Tests cover both halves, plus the operational vars set further down so they
don't regress the other way.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

`ow ssh --env-file` reads a .env and hands it to the provider, but in dev mode
`start_worker` rebuilt `env` from `os.environ` using a five-var credential list,
replacing whatever the caller passed. Anything outside that list never reached
the pod: `WANDB_API_KEY`, `WANDB_PROJECT` and `MAX_JOBS` all vanished silently,
so `--env-file` looked like it worked while delivering almost nothing.

The credential list still gets forwarded from the caller's shell, but values the
caller passed explicitly now survive and take precedence over the shell.

Tests cover both halves, plus the operational vars set further down so they
don't regress the other way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant