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: git context to not exceed spawn sync buffer for very large inFile metadata #161

Merged
merged 1 commit into from
Jul 6, 2021

Conversation

scolladon
Copy link
Owner

What does this pull request contains


  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Removed for now removed features.
  • Fixed for any bug fixes.
  • Security in case of vulnerabilities.

Explain your changes


git context is now set to 200 (instead of 10000000000).
It allows very large file to

  • not exceed the spawnSync buffer
  • keep default spawnSync buffer (1024*1024)
  • keep working for every infile metadata kind (200 of context line seems to be enough during the tests)

Does this close any currently open issues?


closes #47 (again)

  • Jest test to check the fix is applied are added.

Any particular element to being able to test locally


Use yarn test
Use the reproduction playground

Any other comments?


Can be included in the next release

Where has this been tested?


Operating System: Darwin Kernel Version 19.6.0: Thu May 6 00:48:39 PDT 2021; root:xnu-6153.141.33~1/RELEASE_X86_64

yarn version: 1.22.10

node version: v14.16.0

git version: 2.32.0

sfdx version: sfdx-cli/7.107.0 darwin-x64 node-v14.16.0

sgd plugin version: 4.61

And keep enough data to work properly
@scolladon scolladon requested a review from mehdicherf July 3, 2021 13:03
@codeclimate
Copy link

codeclimate bot commented Jul 3, 2021

Code Climate has analyzed commit f711912 and detected 0 issues on this pull request.

View more on Code Climate.

@codecov
Copy link

codecov bot commented Jul 3, 2021

Codecov Report

Merging #161 (f711912) into master (b8f482c) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #161   +/-   ##
=======================================
  Coverage   99.27%   99.27%           
=======================================
  Files          18       18           
  Lines         414      414           
=======================================
  Hits          411      411           
  Misses          3        3           
Impacted Files Coverage Δ
src/utils/fileGitDiff.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8f482c...f711912. Read the comment docs.

@scolladon scolladon merged commit 21a31f8 into master Jul 6, 2021
@scolladon scolladon deleted the fix/buffer-usage-with-large-infile branch July 6, 2021 13:24
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.

[Labels Directory] CustomLabel file doesn't contains label changes
2 participants