fix(bulk2): bypass jsforce response buffering W-21348168#1388
Open
cristiand391 wants to merge 6 commits intomainfrom
Open
fix(bulk2): bypass jsforce response buffering W-21348168#1388cristiand391 wants to merge 6 commits intomainfrom
cristiand391 wants to merge 6 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Update
data export bulkto use undici instead of jsforce's request methods when retrieving bulk batches.jsforce buffers batches response in memory a few times, causing one of the early steps to throw on big batches, see:
forcedotcom/cli#3507 (comment)
The buffering happens at the low-level request helper in jsforce so all request methods are affected.
This PR updates the bulkRequest helper to use undici to fetch the batches.
Repro:
I couldn't get to repro this, exporting +1M
ScratchOrgInforecords from our na40hub but these still don't generate big enough batches to trigger reported error.I've created prerelease last week and customer verified it worked:
forcedotcom/cli#3507 (comment)
we do have NUT tests for +1M exports for linux/win:
plugin-data/test/commands/data/export/bulk.nut.ts
Line 68 in 487e13c
What issues does this PR fix or reference?
forcedotcom/cli#3507
@W-21348168@