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

git node wpt times out on large folders #810

Open
KhafraDev opened this issue May 14, 2024 · 1 comment · May be fixed by #813
Open

git node wpt times out on large folders #810

KhafraDev opened this issue May 14, 2024 · 1 comment · May be fixed by #813

Comments

@KhafraDev
Copy link
Member

git node wpt fetch or git node wpt service-workers consistently times out for me

   ⚠  Please create fetch.json in test/wpt/status
------------------------ Checking updates for fetch... -------------------------
No records for fetch in local test/fixtures/wpt/versions.json
pulling files from scratch...
----------------- Writing assets to test/fixtures/wpt/fetch... -----------------
✔  Read asset list, 796 files in total.
⠙ Downloaded test/fixtures/wpt/fetch/orb/resources/png-mislabeled-as-html.pngTypeError: fetch failed
    at fetch (/root/.volta/tools/image/packages/@node-core/utils/lib/node_modules/@node-core/utils/node_modules/undici/index.js:110:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at runNextTicks (node:internal/process/task_queues:64:3)
    at listOnTimeout (node:internal/timers:540:9)
    at process.processTimers (node:internal/timers:514:7)
    at async Request.buffer (file:///root/.volta/tools/image/packages/@node-core/utils/lib/node_modules/@node-core/utils/lib/request.js:40:17)
    at async WPTUpdater.pullTextFile (file:///root/.volta/tools/image/packages/@node-core/utils/lib/node_modules/@node-core/utils/lib/wpt/index.js:55:21)
    at async Promise.all (index 58)
    at async WPTUpdater.pullAllAssets (file:///root/.volta/tools/image/packages/@node-core/utils/lib/node_modules/@node-core/utils/lib/wpt/index.js:82:5)
    at async WPTUpdater.update (file:///root/.volta/tools/image/packages/@node-core/utils/lib/node_modules/@node-core/utils/lib/wpt/index.js:165:5) {
  cause: AggregateError
      at internalConnectMultiple (node:net:1114:18)
      at internalConnectMultiple (node:net:1177:5)
      at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
      at listOnTimeout (node:internal/timers:575:11)
      at process.processTimers (node:internal/timers:514:7) {
    code: 'ETIMEDOUT',
    [errors]: [
      [Error], [Error],
      [Error], [Error],
      [Error], [Error],
      [Error], [Error]
    ]
  }
}
@KhafraDev
Copy link
Member Author

Chunking the downloads fixes it for me, makes sense, opening 750-something connections simultaneously is probably going to cause issues.

    for (let i = 0; i < assets.length; i += 10) {
      const chunk = assets.slice(i, i + 10)
      await Promise.all(chunk.map(
        (asset) => this.pullTextFile(fixtures, asset.name)
      ));
    }

await Promise.all(assets.map(
(asset) => this.pullTextFile(fixtures, asset.name)
));

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 a pull request may close this issue.

1 participant