-
Notifications
You must be signed in to change notification settings - Fork 565
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 buffer size #3600
Conversation
src/lib/iac/test/v2/scan/index.ts
Outdated
@@ -53,6 +53,7 @@ function scanWithConfig( | |||
const process = childProcess.spawnSync(policyEnginePath, args, { | |||
encoding: 'utf-8', | |||
stdio: 'pipe', | |||
maxBuffer: 1024 * 1024 * 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know what value was originally being used?
Do we know how bigger the buffer's cap just became?
Why was this value chosen in particular?
src/lib/iac/test/v2/scan/index.ts
Outdated
@@ -53,6 +53,7 @@ function scanWithConfig( | |||
const process = childProcess.spawnSync(policyEnginePath, args, { | |||
encoding: 'utf-8', | |||
stdio: 'pipe', | |||
maxBuffer: 1024 * 1024 * 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value is 1024 * 1024
, if we see in the future that multiplying it by 10 is not enough we can increase it further.
06aadca
to
8079fe3
Compare
@YairZ101 Can you please share this solution with #cli for visibility? |
@ofekatr why do you think we should post this in #cli? this PR doesn't affect the CLI as a whole. |
What does this PR do?
The PR fixes the problem where in some cases when scanning a directory with a high number of files, the scan failed due to an ENOBUFS error.
The fix is rather simple, it simply increases the max buffer.