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 using Node.js 22.x. #62341

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Test using Node.js 22.x. #62341

merged 2 commits into from
Jun 6, 2024

Conversation

desrosj
Copy link
Contributor

@desrosj desrosj commented Jun 5, 2024

What?

This updates the version of Node.js used in test matrices from 20.x & 21.x to 20.x & 22.x.

Why?

Version 20.0.0 was released on April 4, 2024 and is the new "current" release for Node.js. The latest version for this major release is is 22.2.0.

21.x has now reached end-of-life. In Node.js, odd numbered versions are not promoted to (Active|Maintenance) LTS. Instead they serve only as the current release for ~6 months.

Some of our test workflows are currently set up to run on 20.x (the current minimum required version of Node.js to contribute) and the latest current version (now 22.x) as a way to proactively test against new versions that become available with the aim to make increasing the minimum version required more easily in the future.

Testing Instructions

These workflows should not be considered all inclusive testing. Contributors can run 22.x locally and report any additional problems that are discovered.

A full list of the changes in 22.0.0 can be found in the project's changelog.

@desrosj desrosj self-assigned this Jun 5, 2024
@desrosj desrosj marked this pull request as ready for review June 5, 2024 14:41
Copy link

github-actions bot commented Jun 5, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>
Co-authored-by: sirreal <jonsurrell@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@desrosj desrosj added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Jun 5, 2024
@sirreal
Copy link
Member

sirreal commented Jun 5, 2024

You can probably land this with admin privileges, but we'll need to update the required checks in this repo accordingly. Right now there are required checks like JavaScript (Node.js 21) 1/4 that won't run on this branch and optional checks like Unit Tests / JavaScript (Node.js 22) 1/4 that are running.

Is it possible to define the required checks with globs?

Copy link
Member

@sirreal sirreal left a comment

Choose a reason for hiding this comment

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

Thank you 👍

@desrosj
Copy link
Contributor Author

desrosj commented Jun 5, 2024

Seems like pattern matching is not an option for status checks. Probably one of my least favorite GH features because of this reason.

Thanks for pointing it out. I think the best path forward is:

  • Get one more review to make sure nothing is missing.
  • Change the required status checks to the new ones (which were available when I just checked).
  • Merge this PR.
  • Post in #core-editor that all PRs will need to be updated to contain the changes here in order to pass requirements and be merged.
  • Something else?

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Looks good. I think it’s expected that GitHub would complain about the required CI jobs. It’s often the case that landing such changes require admin permissions.

@sirreal
Copy link
Member

sirreal commented Jun 6, 2024

The proposed steps to land this seem reasonable 👍

@desrosj desrosj merged commit 3a1cbcf into trunk Jun 6, 2024
67 of 70 checks passed
@desrosj desrosj deleted the update/node-js-test-versions branch June 6, 2024 13:22
@github-actions github-actions bot added this to the Gutenberg 18.6 milestone Jun 6, 2024
@desrosj
Copy link
Contributor Author

desrosj commented Jun 6, 2024

@gziolo could you take a look at the branch rules for trunk and confirm everything looks good?

@gziolo
Copy link
Member

gziolo commented Jun 6, 2024

It looks good and seems to work correctly. I checked in the newly open PR: #62370.

patil-vipul pushed a commit to patil-vipul/gutenberg that referenced this pull request Jun 17, 2024
* Test using Node.js 22.x.

* Update Node.js in create block workflow.

---------

Co-authored-by: desrosj <desrosj@git.wordpress.org>
Co-authored-by: sirreal <jonsurrell@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants