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

benchmark: use cluster.isPrimary instead of cluster.isMaster #48002

Conversation

deokjinkim
Copy link
Contributor

@deokjinkim deokjinkim commented May 14, 2023

cluster.isMaster was deprecated. So need to use cluster.isPrimary for benchmark.

Refs: #47981

@nodejs-github-bot nodejs-github-bot added benchmark Issues and PRs related to the benchmark subsystem. cluster Issues and PRs related to the cluster subsystem. http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels May 14, 2023
Copy link
Member

@tniessen tniessen left a comment

Choose a reason for hiding this comment

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

In benchmarks, this makes sense. In tests, there are already various occurrences of isPrimary, and removing all usages of the old APIs means that they won't be covered by tests anymore. We should still be testing deprecated APIs until they are removed.

`cluster.isMaster` was deprecated. So need to use `cluster.isPrimary`
for benchmark.

Refs: nodejs#47981
@deokjinkim deokjinkim force-pushed the 230514_benchmark_use_cluster_isprimary branch from 7fa0309 to fab804c Compare May 14, 2023 14:55
@deokjinkim deokjinkim changed the title benchmark,test: use cluster.isPrimary instead of cluster.isMaster benchmark: use cluster.isPrimary instead of cluster.isMaster May 14, 2023
@deokjinkim
Copy link
Contributor Author

In benchmarks, this makes sense. In tests, there are already various occurrences of isPrimary, and removing all usages of the old APIs means that they won't be covered by tests anymore. We should still be testing deprecated APIs until they are removed.

I agree with you. So revert changed code for test. Thank you for kind review!

@deokjinkim deokjinkim marked this pull request as draft May 15, 2023 00:29
@deokjinkim deokjinkim marked this pull request as ready for review May 15, 2023 00:30
@deokjinkim deokjinkim added request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed http Issues or PRs related to the http subsystem. test Issues and PRs related to the tests. labels May 15, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 15, 2023
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@deokjinkim deokjinkim added the commit-queue Add this label to land a pull request using GitHub Actions. label May 15, 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 May 16, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/48002
✔  Done loading data for nodejs/node/pull/48002
----------------------------------- PR info ------------------------------------
Title      benchmark: use `cluster.isPrimary` instead of `cluster.isMaster` (#48002)
Author     Deokjin Kim  (@deokjinkim)
Branch     deokjinkim:230514_benchmark_use_cluster_isprimary -> nodejs:main
Labels     cluster, benchmark, author ready, needs-ci
Commits    1
 - benchmark: use `cluster.isPrimary` instead of `cluster.isMaster`
Committers 1
 - Deokjin Kim 
PR-URL: https://github.com/nodejs/node/pull/48002
Refs: https://github.com/nodejs/node/pull/47981
Reviewed-By: Moshe Atlow 
Reviewed-By: Tobias Nießen 
Reviewed-By: Luigi Pinca 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/48002
Refs: https://github.com/nodejs/node/pull/47981
Reviewed-By: Moshe Atlow 
Reviewed-By: Tobias Nießen 
Reviewed-By: Luigi Pinca 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sun, 14 May 2023 13:59:40 GMT
   ✔  Approvals: 3
   ✔  - Moshe Atlow (@MoLow) (TSC): https://github.com/nodejs/node/pull/48002#pullrequestreview-1425560993
   ✔  - Tobias Nießen (@tniessen) (TSC): https://github.com/nodejs/node/pull/48002#pullrequestreview-1425565383
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/48002#pullrequestreview-1427261292
   ✘  Last GitHub CI failed
   ℹ  Last Full PR CI on 2023-05-15T13:01:01Z: https://ci.nodejs.org/job/node-test-pull-request/51817/
- Querying data for job/node-test-pull-request/51817/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/4992884399

@deokjinkim deokjinkim added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels May 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 May 17, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/48002
✔  Done loading data for nodejs/node/pull/48002
----------------------------------- PR info ------------------------------------
Title      benchmark: use `cluster.isPrimary` instead of `cluster.isMaster` (#48002)
Author     Deokjin Kim  (@deokjinkim)
Branch     deokjinkim:230514_benchmark_use_cluster_isprimary -> nodejs:main
Labels     cluster, benchmark, author ready, needs-ci
Commits    1
 - benchmark: use `cluster.isPrimary` instead of `cluster.isMaster`
Committers 1
 - Deokjin Kim 
PR-URL: https://github.com/nodejs/node/pull/48002
Refs: https://github.com/nodejs/node/pull/47981
Reviewed-By: Moshe Atlow 
Reviewed-By: Tobias Nießen 
Reviewed-By: Luigi Pinca 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/48002
Refs: https://github.com/nodejs/node/pull/47981
Reviewed-By: Moshe Atlow 
Reviewed-By: Tobias Nießen 
Reviewed-By: Luigi Pinca 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sun, 14 May 2023 13:59:40 GMT
   ✔  Approvals: 3
   ✔  - Moshe Atlow (@MoLow) (TSC): https://github.com/nodejs/node/pull/48002#pullrequestreview-1425560993
   ✔  - Tobias Nießen (@tniessen) (TSC): https://github.com/nodejs/node/pull/48002#pullrequestreview-1425565383
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/48002#pullrequestreview-1427261292
   ✘  Last GitHub CI failed
   ℹ  Last Full PR CI on 2023-05-16T14:04:27Z: https://ci.nodejs.org/job/node-test-pull-request/51817/
- Querying data for job/node-test-pull-request/51817/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/4998309251

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

Landed in ca09656

targos pushed a commit that referenced this pull request May 30, 2023
`cluster.isMaster` was deprecated. So need to use `cluster.isPrimary`
for benchmark.

Refs: #47981
PR-URL: #48002
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@targos targos mentioned this pull request Jun 4, 2023
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
`cluster.isMaster` was deprecated. So need to use `cluster.isPrimary`
for benchmark.

Refs: #47981
PR-URL: #48002
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
`cluster.isMaster` was deprecated. So need to use `cluster.isPrimary`
for benchmark.

Refs: nodejs#47981
PR-URL: nodejs#48002
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[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. benchmark Issues and PRs related to the benchmark subsystem. cluster Issues and PRs related to the cluster subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants