Skip to content

fix(ops): orb-deploy --detach forwards ORB_DEPLOY_* knobs - #2372

Open
Th0rgal wants to merge 1 commit into
masterfrom
claude/orb-deploy-detach-env
Open

Th0rgal wants to merge 1 commit into
masterfrom
claude/orb-deploy-detach-env

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Nov 30, 2026

Copy link
Copy Markdown
Owner

What and why

orb-deploy --detach re-execs itself through systemd-run, whose transient unit starts with systemd's environment rather than the caller's. So ORB_DEPLOY_CANARY=warn orb-deploy --detach … silently ran the canaries in block mode, and ORB_DEPLOY_BUILD, ORB_DEPLOY_SELFTEST and the aarch64 knobs were dropped the same way. Found on the first canary deploy of #2368.

Every ORB_DEPLOY_* variable that is set is now forwarded with --setenv. ORB_DEPLOY_LOCK_FD is excluded, because it names a file descriptor of the calling process.

How it was tested

python3 scripts/test_orb_dev_autodeploy.py: 31 tests OK. The new test test_detach_forwards_orb_deploy_knobs_to_the_transient_unit runs --detach with stub systemd-run/systemctl on PATH. It checks that ORB_DEPLOY_CANARY=warn and ORB_DEPLOY_BUILD=1 are forwarded, that ORB_DEPLOY_LOCK_FD and unrelated variables are not, and that the arguments are passed on unchanged. The new test fails against master's orb-deploy.

Not verified live

  • A detached deploy on agent-core logs canaries FAILED; ORB_DEPLOY_CANARY=warn (rather than stopping) when a canary fails. Closed by: the next ORB_DEPLOY_CANARY=warn orb-deploy --detach run (lead session).

…unit

systemd-run starts the unit with systemd's environment, so
ORB_DEPLOY_CANARY=warn orb-deploy --detach ... silently ran the canaries in
block mode (and ORB_DEPLOY_BUILD/SELFTEST etc. were dropped too). Every set
ORB_DEPLOY_* variable is now passed with --setenv, except ORB_DEPLOY_LOCK_FD
(a descriptor of the calling process).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant