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

[CODE-1052] Invalid string length while appending coverage files for upload #553

Closed
drazisil-codecov opened this issue Dec 27, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@drazisil-codecov
Copy link
Contributor

Describe the bug
On Linux: ['error'] There was an error running the uploader: Invalid string length
On MacOS: : Error: Cannot create a string longer than 0x1fffffe8 characters

This occurs when appending large XML coverage reports during the Processing <filename> step.

To Reproduce
Steps to reproduce the behavior:

  1. Download the binary uploader
  2. Visit http://mattmahoney.net/dc/textdata.html
  3. Download http://mattmahoney.net/dc/enwik9.zip from that page (or here)
  4. unzip file
  5. attempt to upload it ./codecov -f ~/Downloads/enwik9
  6. See error

Expected behavior

The uploader is unable to handle large files concatenated together. This appears to be a V8 limit, see GitHub issue in the additional context section.

Additional context
nodejs/node#35973 (comment)

@hackerrdave
Copy link

Think we'll need to refactor away from using readFile and towards using stream via createReadStream

@drazisil-codecov
Copy link
Contributor Author

Think we'll need to refactor away from using readFile and towards using stream via createReadStream

Will that fix this? The issue, as I understand it, is here

.concat(fileContents)

@hackerrdave
Copy link

Yea - on occasion there must be files large enough that we hit the max allowed in node.js process since we read the whole file into memory via readFile() - using the createReadStream approach can stream file contents to upload destination

@drazisil-codecov drazisil-codecov added the bug Something isn't working label Jan 5, 2022
@drazisil-codecov drazisil-codecov changed the title Invalid string length while appending coverage files for upload [CODE-1052] Invalid string length while appending coverage files for upload Feb 23, 2022
@drazisil-codecov
Copy link
Contributor Author

Closed by #746

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants