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

network imports not working on vmThreads and vmForks pools #4995

Closed
6 tasks done
hi-ogawa opened this issue Jan 18, 2024 · 1 comment · May be fixed by #4996
Closed
6 tasks done

network imports not working on vmThreads and vmForks pools #4995

hi-ogawa opened this issue Jan 18, 2024 · 1 comment · May be fixed by #4996
Labels
feat: vm pool Issues related to VM pool p2-edge-case Bug, but has workaround or limited in scope (priority)

Comments

@hi-ogawa
Copy link
Contributor

hi-ogawa commented Jan 18, 2024

Describe the bug

Related to

Non-VM pools should be working after #4987, but VM pool seems to have a problem since it relies on custom import handler, which doesn't support pulling modules for network I suppose:

export class ExternalModulesExecutor {

Reproduction

Can be reproduced on Vitest repo via:

$ pnpm -C test/network-imports test -- --pool vmThreads

...

 FAIL  test/basic.test.ts [ test/basic.test.ts ]
Error: ENOENT: no such file or directory, open 'http://localhost:9602/slash@3.0.0.js'
 ❯ Object.openSync node:fs:596:3
 ❯ readFileSync node:fs:464:35

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, syscall: 'open', code: 'ENOENT', path: 'http://localhost:9602/slash@3.0.0.js' }
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

(Actually --experimental-network-imports is irrelevant for VM since import is based on custom implementation)

// not supported?
// FAIL test/basic.test.ts [ test/basic.test.ts ]
// Error: ENOENT: no such file or directory, open 'http://localhost:9602/slash@3.0.0.js'
// ❯ Object.openSync node:fs:596:3
// ❯ readFileSync node:fs:464:35
vmThreads: {
execArgv: ['--experimental-network-imports'],
},

System Info

System:
    OS: Linux 6.6 Arch Linux
    CPU: (12) x64 AMD Ryzen 5 5625U with Radeon Graphics
    Memory: 1.86 GB / 14.98 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 18.19.0 - ~/.volta/tools/image/node/18.19.0/bin/node
    Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 10.2.3 - ~/.volta/tools/image/node/18.19.0/bin/npm
    pnpm: 8.10.3 - ~/.volta/tools/image/node/18.19.0/bin/pnpm
  Browsers:
    Chromium: 120.0.6099.216
  npmPackages:
    @vitest/browser: workspace:* => 1.2.1 
    @vitest/coverage-istanbul: workspace:* => 1.2.1 
    @vitest/coverage-v8: workspace:* => 1.2.1 
    @vitest/ui: workspace:* => 1.2.1 
    vite: ^5.0.0 => 5.0.2 
    vitest: workspace:* => 1.2.1

Used Package Manager

pnpm

Validations

@hi-ogawa hi-ogawa changed the title network imports not working for vmThreads and vmForks pools network imports not working on vmThreads and vmForks pools Jan 18, 2024
@hi-ogawa hi-ogawa added p3-minor-bug An edge case that only affects very specific usage (priority) feat: vm pool Issues related to VM pool labels Jan 19, 2024
@sheremet-va sheremet-va added p2-edge-case Bug, but has workaround or limited in scope (priority) and removed bug p3-minor-bug An edge case that only affects very specific usage (priority) labels Feb 16, 2024
@sheremet-va
Copy link
Member

Fixed by #5610

@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: vm pool Issues related to VM pool p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants