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

Add automation for updating libuv dependency #45362

Merged
merged 3 commits into from Nov 21, 2022
Merged

Add automation for updating libuv dependency #45362

merged 3 commits into from Nov 21, 2022

Conversation

facutuesca
Copy link
Contributor

@facutuesca facutuesca commented Nov 7, 2022

Description

Add a Github Action that checks for new versions of the libuv C library, and creates a PR to update it if a newer version than the one present in the repo is found.

Refs: nodejs/security-wg#828

Details

Currently, if one runs the script to update to version 1.44.2, the uv folder will end up with changes (even though Node's libuv version is also at 1.44.2):

bash tools/dep_updaters/update-libuv.sh 1.44.2
# (...script output....)

git status
# Changes not staged for commit:
#  (use "git add <file>..." to update what will be committed)
#  (use "git restore <file>..." to discard changes in working directory)
#        modified:   deps/uv/include/uv/win.h
#        modified:   deps/uv/src/win/poll.c

This is due to a change made when merging #42340. More specifically, see #42340 (comment). This accounts for the differences between Node's repo and upstream.

Since this seems to be a change that will be reverted in the next release (as per the comment), it should already be taken care of when the update-libuv.sh script is run for that next version.

cc: @lpinca

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/actions

@nodejs-github-bot nodejs-github-bot added meta Issues and PRs related to the general management of the project. tools Issues and PRs related to the tools directory. labels Nov 7, 2022
@lpinca
Copy link
Member

lpinca commented Nov 7, 2022

Sometimes manual changes to common.gypi and uv.gyp are needed but I guess we will notice this due to compilation failures. Another thing is how to add the changelog in the commit message.

@facutuesca
Copy link
Contributor Author

Sometimes manual changes to common.gypi and uv.gyp are needed but I guess we will notice this due to compilation failures. Another thing is how to add the changelog in the commit message.

The idea for this script is to automate the copying of the source code to Node's repo, eliminating human errors in that step. Any extra changes (such as fixing the build files, or customizing the commit message) can be done on top of the branch created by the script, by the people reviewing/merging the PR.

My point is: automating the commit message to include the new version's changelog would add complexity, so maybe it could be a future improvement instead of adding it here.

cd "$WORKSPACE"

echo "Fetching libuv source archive"
curl -sL "https://api.github.com/repos/libuv/libuv/tarball/v$LIBUV_VERSION" | tar xzf -
Copy link
Member

Choose a reason for hiding this comment

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

https://dist.libuv.org/dist/v$LIBUV_VERSION/libuv-v$LIBUV_VERSION.tar.gz can also be used. I have no preference.

Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

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

lgtm

@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 10, 2022
@anonrig
Copy link
Member

anonrig commented Nov 10, 2022

@facutuesca Can you resolve the conflicts?

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 10, 2022
@nodejs-github-bot
Copy link
Collaborator

@facutuesca
Copy link
Contributor Author

@facutuesca Can you resolve the conflicts?

Fixed

@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 10, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 10, 2022
@nodejs-github-bot
Copy link
Collaborator

tools/update-libuv.sh Outdated Show resolved Hide resolved
@gengjiawen gengjiawen added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 17, 2022
Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

s/Node/Node.js/

node/doc/README.md

Lines 87 to 89 in 184af1c

* Use _Node.js_ and not _Node_, _NodeJS_, or similar variants.
<!-- lint enable prohibited-strings remark-lint-->
* When referring to the executable, _`node`_ is acceptable.

Can you please wrap the lines in the markdown document to 80 chars?

tools/dep_updaters/README.md Outdated Show resolved Hide resolved
tools/dep_updaters/README.md Outdated Show resolved Hide resolved
tools/dep_updaters/README.md Outdated Show resolved Hide resolved
tools/dep_updaters/README.md Outdated Show resolved Hide resolved
tools/dep_updaters/README.md Outdated Show resolved Hide resolved
tools/dep_updaters/README.md Outdated Show resolved Hide resolved
tools/dep_updaters/update-libuv.sh Outdated Show resolved Hide resolved
tools/dep_updaters/update-libuv.sh Outdated Show resolved Hide resolved
tools/dep_updaters/README.md Outdated Show resolved Hide resolved
@aduh95 aduh95 removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 20, 2022
Add a Github Action that checks for new versions of the `libuv` C
library, and creates a PR to update it if a newer version than the one
present in the repo is found.

Refs: nodejs/security-wg#828
tools/dep_updaters/README.md Outdated Show resolved Hide resolved
tools/dep_updaters/README.md Outdated Show resolved Hide resolved
@aduh95 aduh95 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. labels Nov 21, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 21, 2022
@nodejs-github-bot nodejs-github-bot merged commit 59bb198 into nodejs:main Nov 21, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 59bb198

ruyadorno pushed a commit that referenced this pull request Nov 21, 2022
Add a Github Action that checks for new versions of the `libuv` C
library, and creates a PR to update it if a newer version than the one
present in the repo is found.

Refs: nodejs/security-wg#828
PR-URL: #45362
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
marco-ippolito pushed a commit to marco-ippolito/node that referenced this pull request Nov 23, 2022
Add a Github Action that checks for new versions of the `libuv` C
library, and creates a PR to update it if a newer version than the one
present in the repo is found.

Refs: nodejs/security-wg#828
PR-URL: nodejs#45362
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@ruyadorno ruyadorno mentioned this pull request Nov 24, 2022
@facutuesca facutuesca deleted the libuv-ci-update branch December 5, 2022 09:48
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
Add a Github Action that checks for new versions of the `libuv` C
library, and creates a PR to update it if a newer version than the one
present in the repo is found.

Refs: nodejs/security-wg#828
PR-URL: #45362
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
Add a Github Action that checks for new versions of the `libuv` C
library, and creates a PR to update it if a newer version than the one
present in the repo is found.

Refs: nodejs/security-wg#828
PR-URL: #45362
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
Add a Github Action that checks for new versions of the `libuv` C
library, and creates a PR to update it if a newer version than the one
present in the repo is found.

Refs: nodejs/security-wg#828
PR-URL: #45362
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 4, 2023
Add a Github Action that checks for new versions of the `libuv` C
library, and creates a PR to update it if a newer version than the one
present in the repo is found.

Refs: nodejs/security-wg#828
PR-URL: #45362
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 5, 2023
Add a Github Action that checks for new versions of the `libuv` C
library, and creates a PR to update it if a newer version than the one
present in the repo is found.

Refs: nodejs/security-wg#828
PR-URL: #45362
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.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. meta Issues and PRs related to the general management of the project. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants