Skip to content

bootstrap: initialize http proxy after user module loader setup #58938

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

Merged
merged 1 commit into from
Jul 5, 2025

Conversation

joyeecheung
Copy link
Member

@joyeecheung joyeecheung commented Jul 3, 2025

The externalized undici relies on the user module loader, so in the externalized build, initialization of http proxy which relies on undici needs to be deferred until after the user module loader is initialized.

Refs: #58865
Refs: #57872

The externalized undici relies on the user module loader, so
in the externalized build, initialization of http proxy which
relies on undici needs to be deferred until after the user module
loader is initialized.
@joyeecheung joyeecheung requested a review from richardlau July 3, 2025 00:43
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels Jul 3, 2025
Copy link

codecov bot commented Jul 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.09%. Comparing base (8173d9d) to head (1d07514).
Report is 22 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #58938   +/-   ##
=======================================
  Coverage   90.09%   90.09%           
=======================================
  Files         640      640           
  Lines      188462   188476   +14     
  Branches    36962    36966    +4     
=======================================
+ Hits       169786   169808   +22     
+ Misses      11404    11385   -19     
- Partials     7272     7283   +11     
Files with missing lines Coverage Δ
lib/internal/process/pre_execution.js 90.74% <100.00%> (-0.65%) ⬇️

... and 35 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 3, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 3, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@atlowChemi atlowChemi added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Jul 4, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 5, 2025
@nodejs-github-bot nodejs-github-bot merged commit 0534672 into nodejs:main Jul 5, 2025
73 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 0534672

@AugustinMauroy
Copy link
Member

In this case what happened if a external http(s) loader is registered that need http_proxy to resolve http(s) specifier ?

@joyeecheung
Copy link
Member Author

As long as the http/https requests happen after the bootstrap completes (for example, only in hooks, not at the top level of the loader code), that shouldn't be a problem.

@AugustinMauroy
Copy link
Member

okay nice !

RafaelGSS pushed a commit that referenced this pull request Jul 8, 2025
The externalized undici relies on the user module loader, so
in the externalized build, initialization of http proxy which
relies on undici needs to be deferred until after the user module
loader is initialized.

PR-URL: #58938
Refs: #58865
Refs: #57872
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants