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

tools: move update-npm to dep updaters #47619

Merged
merged 3 commits into from
Apr 26, 2023

Conversation

marco-ippolito
Copy link
Member

@marco-ippolito marco-ippolito commented Apr 19, 2023

Move update-npm to correct folder
It could actually be deleted because people from npm take care of the update (for reference: https://github.com/npm/cli/blob/latest/.github/workflows/create-node-pr.yml) with npm-cli-bot but I'm leaving it in case a manual update is needed

@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Apr 19, 2023
Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

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

This breaks the script because the script makes assumptions about what directory it is in. You'll need to update the line that sets BASE_DIR so that DEPS_DIR will be set correctly.

Trott
Trott previously requested changes Apr 23, 2023
Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

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

Oops, just noticed that this script and its path are mentioned in doc/contributing/maintaining-npm.md so we'll want to update that too. Might be worth having a look to see if material in that file needs to be replaced if this script isn't actually being used anymore.

@Trott Trott added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Apr 23, 2023
@Trott
Copy link
Member

Trott commented Apr 23, 2023

This script doesn't work. It runs make but cli has no Makefile. We might want to remove the script entirely or ask @nodejs/npm for recommendations on how to get it working again.

@wraithgar
Copy link

wraithgar commented Apr 24, 2023

imho the way npm was updated into node was pretty overwrought. The existing npm can be used to find the new npm. Absent that the url can be automatically built if the npm version is known. Everything from the git clone to the make release can be replaced with the fetching of a single url:

$ curl -s $(npm view npm@$NPM_VERSION dist.tarball) > npm.tgz
$ rm rf npm
$ mkdir npm
$ tar zxvf npm.tgz --strip-component=1 -C npm

That's it. The published npm package does not have any further build steps. It is necessarily self-contained because otherwise we'd have no way to bootstrap it.

I'll let @lukekarrys weigh in too since I know he's thought a lot about this recently.

@wraithgar
Copy link

This script, if fixed, is a nice backup to the existing process but as of today the PR to update npm is a single one-liner part of npm's release process. It also makes a PR that's a full diff between the existing version in Node.js against the newest, with a changelog. We're happy to keep the current process if it's working for y'all.

@marco-ippolito
Copy link
Member Author

My intention was to keep it as a backup so I'll fix the script

@marco-ippolito
Copy link
Member Author

marco-ippolito commented Apr 24, 2023

@wraithgar PTAL

@Trott Trott dismissed their stale review April 25, 2023 18:45

Issue is addressed

@marco-ippolito marco-ippolito added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Apr 26, 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 Apr 26, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/47619
✔  Done loading data for nodejs/node/pull/47619
----------------------------------- PR info ------------------------------------
Title      tools: move update-npm to dep updaters (#47619)
Author     Marco Ippolito  (@marco-ippolito)
Branch     marco-ippolito:feat/automate-npm -> nodejs:main
Labels     tools, commit-queue-squash
Commits    3
 - tools: move update-npm to dep updaters
 - fix: update base dir
 - fix: npm update file
Committers 1
 - Marco Ippolito 
PR-URL: https://github.com/nodejs/node/pull/47619
Reviewed-By: Luigi Pinca 
Reviewed-By: Paolo Insogna 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/47619
Reviewed-By: Luigi Pinca 
Reviewed-By: Paolo Insogna 
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last review:
   ⚠  - fix: npm update file
   ℹ  This PR was created on Wed, 19 Apr 2023 12:17:08 GMT
   ✔  Approvals: 2
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/47619#pullrequestreview-1392754676
   ✔  - Paolo Insogna (@ShogunPanda): https://github.com/nodejs/node/pull/47619#pullrequestreview-1395770782
   ✔  Last GitHub CI successful
   ℹ  Green GitHub CI is sufficient
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/4806468899

@marco-ippolito marco-ippolito removed the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Apr 26, 2023
@marco-ippolito marco-ippolito added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 26, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 26, 2023
@nodejs-github-bot nodejs-github-bot merged commit e2e3f5c into nodejs:main Apr 26, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in e2e3f5c

yjl9903 pushed a commit to yjl9903/node that referenced this pull request Apr 28, 2023
PR-URL: nodejs#47619
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
yjl9903 pushed a commit to yjl9903/node that referenced this pull request Apr 28, 2023
PR-URL: nodejs#47619
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
yjl9903 pushed a commit to yjl9903/node that referenced this pull request Apr 29, 2023
PR-URL: nodejs#47619
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
targos pushed a commit that referenced this pull request May 2, 2023
PR-URL: #47619
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
@targos targos mentioned this pull request May 2, 2023
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
PR-URL: #47619
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
PR-URL: nodejs#47619
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants