Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Pass NODE_PATH to task runners #13652

Merged
merged 3 commits into from
Mar 5, 2025

Conversation

netroy
Copy link
Member

@netroy netroy commented Mar 3, 2025

Summary

NODE_PATH determines where external node modules will be require'd from.
Without the same value NODE_PATH in task-runners as in the parent process, any user code that uses require, and used to work on the old sandbox, will now stop working on task-runners.
This PR copies over this env variable to ensure backward-compatibility.

Related Linear tickets, Github issues, and Community forum posts

https://community.n8n.io/t/enabling-task-runners-breaks-workflows/83774

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Mar 3, 2025
@netroy netroy requested a review from ivov March 5, 2025 14:13
@ivov
Copy link
Contributor

ivov commented Mar 5, 2025

We should allowlist it in the launcher config also.

Currently this is undocumented, so we might want to decide if we should make it official or drop it in v2.

Copy link

cypress bot commented Mar 5, 2025

n8n    Run #9659

Run Properties:  status check passed Passed #9659  •  git commit 6c11c614c6: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
Project n8n
Branch Review pass-NODE_PATH-to-task-runners
Run status status check passed Passed #9659
Run duration 04m 46s
Commit git commit 6c11c614c6: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
Committer कारतोफ्फेलस्क्रिप्ट™
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 5
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 440
View all changes introduced in this branch ↗︎

Copy link
Contributor

github-actions bot commented Mar 5, 2025

✅ All Cypress E2E specs passed

@netroy netroy merged commit 906770a into master Mar 5, 2025
38 checks passed
@netroy netroy deleted the pass-NODE_PATH-to-task-runners branch March 5, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants