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

fix(tests): Increase git buffer size so cfn/sam schema can be downloaded #3083

Merged
merged 1 commit into from
Jan 4, 2023

Conversation

jpinkney-aws
Copy link
Contributor

Problem

Currently the integration tests in #3042 are failing because the SAM schema fails to download with stdout maxBuffer length exceeded

Solution

Increase git buffer size

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…aded

Currently the integration tests in #3042 are failing because the SAM schema fails to download with ```stdout maxBuffer length exceeded```

Increase buffer size
@jpinkney-aws jpinkney-aws requested a review from a team as a code owner January 3, 2023 20:32
@jpinkney-aws jpinkney-aws merged commit 69f5fda into master Jan 4, 2023
@jpinkney-aws jpinkney-aws deleted the jpinkney-aws/increase-git-buffer branch January 4, 2023 15:34
@@ -369,7 +369,7 @@ export class GitExtension {

return execFileAsync(api.git.path, ['cat-file', type, hash], {
cwd: tmpDir,
maxBuffer: 1024 * 1024 * 5,
maxBuffer: 1024 * 1024 * 6,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just set it to 50MB:

Suggested change
maxBuffer: 1024 * 1024 * 6,
maxBuffer: 1024 * 1024 * 50,

This thread mentions dynamic sizing a potential solution. Not sure if Node dynamically sizes the buffer already or if the buffer is allocated based off maxBuffer. If the former then Infinity could work although it would make it easier to run out of memory on the heap, crashing V8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants