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

test: improve test-bootstrap-modules.js #50708

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

joyeecheung
Copy link
Member

Divide builtins into two lists depending on whether they are loaded before pre-execution or at run time, and give clearer suggestions about how to deal with them based on the category they are in.

This helps preventing regressions like the one reported in #45662.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Nov 13, 2023
Divide builtins into two lists depending on whether
they are loaded before pre-execution or at run time,
and give clearer suggestions about how to deal with them
based on the category they are in.

This helps preventing regressions like the one reported
in nodejs#45662.
@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 13, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 13, 2023
@nodejs-github-bot
Copy link
Collaborator

// the two stages for them.
const expected = {};

expected.beforePreExec = new Set([
Copy link
Member

Choose a reason for hiding this comment

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

To clearly indicate that these modules were executed at build time, I would find a name like atStartupSnapshot or atBuildTime, to be more intuitive as contradicting atRunTime.

Copy link
Member Author

@joyeecheung joyeecheung Nov 15, 2023

Choose a reason for hiding this comment

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

I thought about that but it seems weird until workers do load builtins into the snapshot (which was what I was working on originally). For now it seems less weird to call it beforePreExec which is still factually correct. But I am also okay with using atStartupSnapshot and add a note saying that this is not factually correct for workers yet (or it's never factually correct for cross-compiled builds before we make snapshot support work for them)

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 17, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 17, 2023
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 17, 2023
@nodejs-github-bot
Copy link
Collaborator

@joyeecheung joyeecheung added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 17, 2023
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Nov 17, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/50708
✔  Done loading data for nodejs/node/pull/50708
----------------------------------- PR info ------------------------------------
Title      test: improve test-bootstrap-modules.js (#50708)
Author     Joyee Cheung  (@joyeecheung)
Branch     joyeecheung:bootstrap-module-test -> nodejs:main
Labels     test, author ready, needs-ci
Commits    2
 - test: improve test-bootstrap-modules.js
 - fixup! test: improve test-bootstrap-modules.js #50708
Committers 2
 - Joyee Cheung 
 - GitHub 
PR-URL: https://github.com/nodejs/node/pull/50708
Reviewed-By: Antoine du Hamel 
Reviewed-By: Richard Lau 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Chengzhong Wu 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/50708
Reviewed-By: Antoine du Hamel 
Reviewed-By: Richard Lau 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Chengzhong Wu 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Mon, 13 Nov 2023 13:10:44 GMT
   ✔  Approvals: 4
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/50708#pullrequestreview-1733682030
   ✔  - Richard Lau (@richardlau) (TSC): https://github.com/nodejs/node/pull/50708#pullrequestreview-1734416571
   ✔  - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/50708#pullrequestreview-1737180743
   ✔  - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/50708#pullrequestreview-1737350580
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2023-11-17T16:08:59Z: https://ci.nodejs.org/job/node-test-pull-request/55712/
- Querying data for job/node-test-pull-request/55712/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 50708
From https://github.com/nodejs/node
 * branch                  refs/pull/50708/merge -> FETCH_HEAD
✔  Fetched commits as ce4642a5c2ac..1cc16d5329ac
--------------------------------------------------------------------------------
Auto-merging test/parallel/test-bootstrap-modules.js
[main 5e27c443ab] test: improve test-bootstrap-modules.js
 Author: Joyee Cheung 
 Date: Sun Nov 12 22:38:30 2023 +0100
 1 file changed, 103 insertions(+), 25 deletions(-)
Auto-merging test/parallel/test-bootstrap-modules.js
[main 562733ba5b] fixup! test: improve test-bootstrap-modules.js #50708
 Author: Joyee Cheung 
 Date: Wed Nov 15 15:40:27 2023 +0100
 1 file changed, 1 insertion(+), 1 deletion(-)
   ✔  Patches applied
There are 2 commits in the PR. Attempting autorebase.
Rebasing (2/4)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: improve test-bootstrap-modules.js

Divide builtins into two lists depending on whether
they are loaded before pre-execution or at run time,
and give clearer suggestions about how to deal with them
based on the category they are in.

This helps preventing regressions like the one reported
in #45662.

PR-URL: #50708
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com
Reviewed-By: Richard Lau rlau@redhat.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Chengzhong Wu legendecas@gmail.com

[detached HEAD cf391d10b0] test: improve test-bootstrap-modules.js
Author: Joyee Cheung joyeec9h3@gmail.com
Date: Sun Nov 12 22:38:30 2023 +0100
1 file changed, 103 insertions(+), 25 deletions(-)
Rebasing (3/4)
Rebasing (4/4)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
fixup! test: improve test-bootstrap-modules.js #50708

Co-authored-by: Antoine du Hamel duhamelantoine1995@gmail.com
PR-URL: #50708
Reviewed-By: Antoine du Hamel duhamelantoine1995@gmail.com
Reviewed-By: Richard Lau rlau@redhat.com
Reviewed-By: Yagiz Nizipli yagiz@nizipli.com
Reviewed-By: Chengzhong Wu legendecas@gmail.com

[detached HEAD a21da1dd34] fixup! test: improve test-bootstrap-modules.js #50708
Author: Joyee Cheung joyeec9h3@gmail.com
Date: Wed Nov 15 15:40:27 2023 +0100
1 file changed, 1 insertion(+), 1 deletion(-)

Successfully rebased and updated refs/heads/main.

ℹ Add commit-queue-squash label to land the PR as one commit, or commit-queue-rebase to land as separate commits.

https://github.com/nodejs/node/actions/runs/6909048350

@joyeecheung joyeecheung added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Nov 17, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 17, 2023
@nodejs-github-bot nodejs-github-bot merged commit 0e24f91 into nodejs:main Nov 17, 2023
65 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 0e24f91

targos pushed a commit that referenced this pull request Nov 23, 2023
Divide builtins into two lists depending on whether
they are loaded before pre-execution or at run time,
and give clearer suggestions about how to deal with them
based on the category they are in.

This helps preventing regressions like the one reported
in #45662.

PR-URL: #50708
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
martenrichter pushed a commit to martenrichter/node that referenced this pull request Nov 26, 2023
Divide builtins into two lists depending on whether
they are loaded before pre-execution or at run time,
and give clearer suggestions about how to deal with them
based on the category they are in.

This helps preventing regressions like the one reported
in nodejs#45662.

PR-URL: nodejs#50708
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
lucshi pushed a commit to lucshi/node that referenced this pull request Nov 27, 2023
Divide builtins into two lists depending on whether
they are loaded before pre-execution or at run time,
and give clearer suggestions about how to deal with them
based on the category they are in.

This helps preventing regressions like the one reported
in nodejs#45662.

PR-URL: nodejs#50708
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Nov 28, 2023
RafaelGSS pushed a commit that referenced this pull request Nov 29, 2023
Divide builtins into two lists depending on whether
they are loaded before pre-execution or at run time,
and give clearer suggestions about how to deal with them
based on the category they are in.

This helps preventing regressions like the one reported
in #45662.

PR-URL: #50708
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Nov 30, 2023
Divide builtins into two lists depending on whether
they are loaded before pre-execution or at run time,
and give clearer suggestions about how to deal with them
based on the category they are in.

This helps preventing regressions like the one reported
in #45662.

PR-URL: #50708
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
Divide builtins into two lists depending on whether
they are loaded before pre-execution or at run time,
and give clearer suggestions about how to deal with them
based on the category they are in.

This helps preventing regressions like the one reported
in #45662.

PR-URL: #50708
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
@UlisesGascon UlisesGascon mentioned this pull request Dec 12, 2023
UlisesGascon pushed a commit that referenced this pull request Dec 19, 2023
Divide builtins into two lists depending on whether
they are loaded before pre-execution or at run time,
and give clearer suggestions about how to deal with them
based on the category they are in.

This helps preventing regressions like the one reported
in #45662.

PR-URL: #50708
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants