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

build: Upgrade to Node 20 #744

Merged
merged 1 commit into from
Mar 8, 2024
Merged

Conversation

arbrandes
Copy link
Contributor

@arbrandes arbrandes commented Mar 7, 2024

Description

As a second step in the Node 20 upgrade process, upgrade .nvmrc and regenerate package-lock.json from scratch using Node 20. Also make the Node 20 test a blocking one.

See the tracking issue for futher information.

@arbrandes arbrandes added the maintenance Routine upkeep necessary for the health of the platform label Mar 7, 2024
@arbrandes arbrandes mentioned this pull request Mar 7, 2024
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (b0fe48d) to head (d536a95).

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #744   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files           2       2           
  Lines           7       7           
======================================
  Misses          7       7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 12 to 14
strategy:
matrix:
node: [18, 20]
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious as to what benefits using a matrix with 18 and 20 has over just upgrading to 20.

My initial reaction is that I'm not sure using a matrix makes sense here.

  • package-lock.json is generated using node 20, so expecting npm ci to work when using node 18 seems odd.
  • No MFEs use a matrix for this step, a specific version is expected
    • Any MFE created using this template would start off with a CI check that needs to pass on both 18 and 20

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The motivation behind the matrix is to try - if at all possible - to get MFEs and libraries to work with both Node 18 and 20 for a transitional period, much like we did for the Node 16 -> 18 upgrade. This is so we can have Tutor - while still on Node 18 - work with MFEs that have already been tested to work on 20. And then when all Tutor-supported MFEs are Node 20-ready, we flip over Tutor, and remove 18 from the Matrix.

But yes, it may be that in some cases it won't be possible. It seems to be working fine here, though.

with:
node-version: ${{ env.NODE_VER }}
node-version: ${{ matrix.node }}
Copy link
Contributor

Choose a reason for hiding this comment

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

If we move away from the matrix, I'd love to switch everything over to using node-version-file instead https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#node-version-file (example from paragon's release workflow: https://github.com/openedx/paragon/blob/98e6313e923c2a70b199f358c2a7063f03647a36/.github/workflows/release.yml#L19)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is sorta what we have now, except it doesn't use that particular setup-nodeism. No objections to moving to that after we remove the matrix, though.

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

:shipit:

Add official Node 20 support by:

* Upgrading to Node 20 in `.nvmrc`
* Regenerating `package-lock.json` from scratch using it
* Blocking on Node 20 CI failures
* Updating lockfile check workflow to v3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Routine upkeep necessary for the health of the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants