danger fails to run locally when diff is larger than maxBuffer size
See original GitHub issueWhen running danger locally, it runs the command git diff master...HEAD
to generate a diff to work on. This command is executed using the default maxBuffer
here.
Backtrace:
(demi) yarn danger local --verbose
yarn run v1.6.0
$ /home/demi/pewpewthespells-com/node_modules/.bin/danger local --verbose
Could not get diff from git between master and HEAD
{ Error: stdout maxBuffer exceeded
at Socket.onChildStdout (child_process.js:305:14)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at addChunk (_stream_readable.js:250:12)
at readableAddChunk (_stream_readable.js:233:13)
at Socket.Readable.push (_stream_readable.js:195:10)
at Pipe.onread (net.js:586:20) cmd: 'git diff master...HEAD' }
Done in 1.53s.
The problem originates from the default being 200kb, and large git diffs can easily exceed that (in my case the diff was 24mb). I was able to get past this issue by locally modifying my danger module code to include a much larger maxBuffer size, but beyond putting a ridiculously large constant in the code, i’m not sure what the best patch for this problem is.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:23 (14 by maintainers)
Top Results From Across the Web
Stdout buffer issue using node child_process - Stack Overflow
The above error occurred because the output generated by the execution of the command was larger than the max buffer size.
Read more >java.io.IOException: Packet len73388953 is out of range!
Its due to the packet length is larger than what jute.maxBuffer allows. Increasing the below property helped : value of jute.maxbuffer to 100MB ......
Read more >Troubleshooting Your Solution | The Codewars Docs
This guide covers common problems you may run into as a newcomer solving kata on Codewars, outlining common mistakes and their typical solutions....
Read more >SMB Exploited: WannaCry Use of "EternalBlue" | Mandiant
If the message request is greater than the SMB MaxBufferSize, the remaining messages are sent as Secondary Trans2 requests.
Read more >ZooKeeper Administrator's Guide
ZooKeeper runs in Java, release 1.8 or greater (JDK 8 LTS, ... then the failure of that switch will take down your entire...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There were binary files but they only appeared in the diff as marked as binary file adds, not the contents of said files. I feel like this is going to potentially be a problem that keeps on happening unless the maxBuffer variable can be scaled to fit? so maybe having it pipe out to a temporary file instead of stdout would be for the best.
Seems good to me, gonna close this.