Skip to content

fix(orchestrator): preserve workdir metadata with login diagnostics - #3773

Open
boxrouter-maintainer wants to merge 1 commit into
e2b-dev:mainfrom
boxrouter-maintainer:fix/workdir-login-shell-metadata
Open

boxrouter-maintainer wants to merge 1 commit into
e2b-dev:mainfrom
boxrouter-maintainer:fix/workdir-login-shell-metadata

Conversation

@boxrouter-maintainer

Copy link
Copy Markdown

saveWorkdirMeta resolves the working directory through a login shell, but previously discarded the image's EnvVars and treated any stderr output as a failed lookup. Login hooks that emit diagnostics could therefore break workdir metadata resolution even when the command succeeded.

Pass the image environment to the lookup command and identify its final absolute path with a dedicated marker. Collect streamed stdout and stderr, accept a valid marked path when the command succeeds, and preserve command failures and all metadata except the resolved WorkDir.

Validation:

  • go test ./pkg/template/build/commands -run 'TestSaveWorkdirMetaFromOutput' -count=1
  • login-shell regression script covering hook stdout/stderr and nonzero exit preservation
  • git diff --check

@cla-bot

cla-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @boxrouter-maintainer on file. You can sign our CLA at https://e2b.dev/docs/cla . Once you've signed, post a comment here that says '@cla-bot check'

@boxrouter-maintainer

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Oct 30, 2026
@cla-bot

cla-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant