fix(workflows): pass ARTIFACTS_DIR/LOG_DIR/BASE_BRANCH to script node subprocesses#1640
Conversation
… subprocesses The bash node executor sets ARTIFACTS_DIR LOG_DIR and BASE_BRANCH on the subprocess (dag-executor.ts:1320-1326), but the script node executor only conditionally forwards caller-supplied variables and never sets these three. Scripts that read ARTIFACTS_DIR from the process environment (e.g. the marketplace-pr-review-and-merge workflow parse-entry node) hit ENOENT in CI because the variable is undefined and resolve with empty string falls back to cwd. Mirror the bash-node executor pattern so script nodes receive the same runtime variables unconditionally.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change modifies ChangesSubprocess Environment Variable Handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… subprocesses (coleam00#1640) The bash node executor sets ARTIFACTS_DIR LOG_DIR and BASE_BRANCH on the subprocess (dag-executor.ts:1320-1326), but the script node executor only conditionally forwards caller-supplied variables and never sets these three. Scripts that read ARTIFACTS_DIR from the process environment (e.g. the marketplace-pr-review-and-merge workflow parse-entry node) hit ENOENT in CI because the variable is undefined and resolve with empty string falls back to cwd. Mirror the bash-node executor pattern so script nodes receive the same runtime variables unconditionally.
Summary
Script nodes weren't getting
ARTIFACTS_DIR,LOG_DIR, orBASE_BRANCHin their subprocess environment, while bash nodes were. This caused the marketplace-pr-review-and-merge workflow'sparse-entryscript node to fail with ENOENT in CI when trying to read.scope-resultfrom artifacts.Root cause
dag-executor.ts:1320-1326(bash node) sets all three vars onsubprocessEnv.dag-executor.ts:1487-1488(script node) only conditionally forwards caller-supplied envVars and never sets these three. Locally the issue was masked because some local shells happened to have ARTIFACTS_DIR inherited from prior runs.Fix
Mirror the bash node env construction in the script node executor.
Verification
Test plan
Summary by CodeRabbit