Skip to content

vfs: resolve inherited worker entry after --import - #66271

Open
lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/issue-66270-worker-vfs-load
Open

lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/issue-66270-worker-vfs-load

Conversation

@lazerg

@lazerg lazerg commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

With --import, a worker that inherits --vfs-load only mounts the source after the preloads have run, but executeUserEntryPoint() resolved the worker's entry point before that. The lookup inside the mount found nothing, so the entry skipped the usual extension search and a worker like new Worker(path.join(__dirname, 'worker')) failed with ERR_MODULE_NOT_FOUND. This resolves the entry again once the mount is in place.

Fixes: #66270

Signed-off-by: lazerg <lazerg2@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. labels Sep 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Caution

AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

@lazerg

lazerg commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

y an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

It is not full automation, i review, test myself

@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.33%. Comparing base (9800c29) to head (e78102a).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66271      +/-   ##
==========================================
- Coverage   92.79%   90.33%   -2.47%     
==========================================
  Files         421      789     +368     
  Lines      191392   273351   +81959     
  Branches    29399    52262   +22863     
==========================================
+ Hits       177606   246931   +69325     
- Misses      13464    16898    +3434     
- Partials      322     9522    +9200     
Files with missing lines Coverage Δ
lib/internal/modules/run_main.js 100.00% <100.00%> (+14.43%) ⬆️

... and 498 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pipobscure

Copy link
Copy Markdown
Contributor

Note: #66140 gives --vfs-load mouted volumes a fixed layerId for that very reason and solves this issue as well.

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

Labels

agentscan:community-flagged module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[worker_threads] inherited --vfs-load is skipped when --import is present

3 participants