Skip to content

fix: use ProxyAgent for bulk export results download @W-23816212@ - #1507

Open
WillieRuemmele wants to merge 3 commits into
mainfrom
wr/fix-bulk-export-proxy
Open

fix: use ProxyAgent for bulk export results download @W-23816212@#1507
WillieRuemmele wants to merge 3 commits into
mainfrom
wr/fix-bulk-export-proxy

Conversation

@WillieRuemmele

@WillieRuemmele WillieRuemmele commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • bulkRequest() in bulkUtils.ts bypasses jsforce to stream results without buffering, but the original implementation didn't carry over jsforce's proxy handling
  • Job creation/polling goes through jsforce's transport which reads HTTP_PROXY/https_proxy env vars and creates a ProxyAgent dispatcher — but the results download called bare undici fetch with no dispatcher
  • This caused "Fetch Failed (10)" errors in proxy-restricted environments, since proxy env vars were completely ignored during the results retrieval phase
  • Fix: read proxy env vars and pass a ProxyAgent dispatcher to undici's fetch, matching the pattern in jsforce's request.ts

@W-23893215@
@W-23816212@
forcedotcom/cli#3620

Test plan

  • Verify build passes (npm run build)
  • Verify existing unit tests pass (npm test)
  • Manual verification in a proxy-restricted environment: run sf data export bulk with --wait and confirm results are retrieved without needing NODE_USE_ENV_PROXY=1

The bulkRequest() function bypasses jsforce to avoid response buffering,
but didn't carry over proxy handling. Job creation/polling goes through
jsforce's transport which uses a ProxyAgent dispatcher, but results
download called undici fetch with no dispatcher — causing 'Fetch Failed
(10)' errors in proxy-restricted environments.

Read proxy env vars and pass a ProxyAgent dispatcher, matching the
pattern in jsforce's request.ts.

W-23893215
W-23816212
@WillieRuemmele
WillieRuemmele force-pushed the wr/fix-bulk-export-proxy branch from eafbb5e to e905aa2 Compare August 17, 2026 16:25
@WillieRuemmele WillieRuemmele changed the title fix: use ProxyAgent for bulk export results download fix: use ProxyAgent for bulk export results download @W-23816212@ Aug 17, 2026
@svc-cli-bot
svc-cli-bot requested a review from a team as a code owner August 17, 2026 16:46
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