-
Notifications
You must be signed in to change notification settings - Fork 75
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: increase maxBuffer of spawnSync #729
Conversation
b0a0719
to
c121446
Compare
@gabrielrussoc It looks like @thomasrockhu-codecov may have fixed this in the latest version with #716 Do you mind pulling down 0.2.0 and testing? |
I can confirm the issue still reproes on 0.2.0, looks like #716 missed this call to |
Here's a public repro: On the linux repository: https://github.com/torvalds/linux (has more than 1MB files)
The repo is too large, |
@mitchell-codecov Any thoughts? @gabrielrussoc is there a setting to tell glob to ignore symlinks? I can't think of a use case where we would want to, seems that's almost guaranteed to not match a report. 🤔 |
I believe this is used to discover the file network and not to look for reports |
update to 100mb add missing usage
Yes, but the network is needed to match against file paths in the reports. It's not documented, but that is its purpose. |
@gabrielrussoc I haven't got the hang of editing PRs from forks from the command line, so I sent your branch a PR :D |
refactor: move max buffer to constants
nodeJS limits the size of the stdout of child processes to 1MB: https://nodejs.org/api/child_process.html#child_processspawnsynccommand-args-options
The output of
git ls-files
exceeds 1MB in my case, falling back to usingglob
. However the glob call hardcodes a list of files that doesn't respect .gitignore and causes weird behaviour.I'm setting 100MB as an arbitrary large value. There is some discussion about the default value of this argument here: nodejs/node#9829
Motivated by #704
Tests
I tried to find tests for this behaviour but it looks like there are none. I manually ran the uploader on a large repository with more than 1MB output:
Before:
After: