dequelabs / dequelabs/axe-core

cherrypick script ran out of buffer using exec

Open
#4,719 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 23h
Merged PRs (30d)
17

Description

Ran into this problem when trying to cherrypick

```
node:child_process:965
throw err;
^

Error: spawnSync /bin/sh ENOBUFS
at Object.spawnSync (node:internal/child_process:1124:20)
at spawnSync (node:child_process:876:24)
at execSync (node:child_process:957:15)
at getCommits (/Users/stevenlambert/deque/axe-core/build/cherry-pick.js:52:18)
at Object. (/Users/stevenlambert/deque/axe-core/build/cherry-pick.js:113:29)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12) {
errno: -55,
code: 'ENOBUFS',
syscall: 'spawnSync /bin/sh',
path: '/bin/sh',
spawnargs: [ '-c', 'git log develop --abbrev-commit --since=2022' ],
error: [Circular *1],
status: null,
signal: 'SIGTERM',
output: [
```

Looks like the call to `git log` exceeded the buffer size limit of `exec`. We could fix this in a few different ways. Either we switch to use `spawn` instead of `exec` and update the code accordingly to handle streaming data, or we could increase the buffer limit of `exec` for certain calls (like `git log`), or reduce the amount of time to get commits from (2 years instead of 3).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.