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

Upgrade node to 18 #2533

Merged
merged 7 commits into from
Nov 15, 2022
Merged

Upgrade node to 18 #2533

merged 7 commits into from
Nov 15, 2022

Conversation

krzysztofzuraw
Copy link
Member

@krzysztofzuraw krzysztofzuraw commented Nov 4, 2022

Fixes: #2525. This PR updates Node.js to the current LTS: 18.x.x.

What was done

  • Upgrade to Node.js in version 18.x.x in:
    • package.json
    • nvmrc
    • docker
  • Update GHA scripts to point to .nvmrc files instead of the hardcoded version in workflows
  • Split build and start npm scripts with generating types into prebuild & prestart (for better readability)

Problems

Broken webpack

Starting from Node.js version 17.x.x maintainers deprecate legacy OpenSSL provider. This is causing our Webpack to throw Error: error:0308010C:digital envelope routines::unsupported while running any command. Suggested workaround is to add NODE_OPTIONS=--openssl-legacy-provider every time we use Webpack in our scripts. There is no fix in the current Webpack release yet 😞.

What we can do?

  1. Stay on version 16.x.x for now and upgrade the Webpack to the newest version (in other PR)
  2. Stay on version 18.x.x and add flags plus upgrade the Webpack to the newest version (in other PR). In this solution, we can't use Node.js in 16.x.x as NODE_OPTIONS are incompatible between 16 and 18.

Pull Request Checklist

  1. This code contains UI changes
  2. All visible strings are translated with proper context including data-formatting
  3. Attributes [data-test-id] are added for new elements
  4. Changes are mentioned in the changelog
  5. The changes are tested in different browsers and in light/dark mode

Test environment config

API_URI=https://automation-dashboard.staging.saleor.cloud/graphql/
MARKETPLACE_URL=https://apps.saleor.io
SALEOR_APPS_ENDPOINT=https://apps.saleor.io/api/saleor-apps

Do you want to run more stable tests?

To run all tests, just select the stable checkbox. To speed up tests, increase the number of containers. Tests will be re-run only when the "run e2e" label is added.

  1. stable
  2. giftCard
  3. category
  4. collection
  5. attribute
  6. productType
  7. shipping
  8. customer
  9. permissions
  10. menuNavigation
  11. pages
  12. sales
  13. vouchers
  14. homePage
  15. login
  16. orders
  17. products
  18. app
  19. plugins
  20. translations
  21. navigation
  22. variants

CONTAINERS=2

@github-actions github-actions bot temporarily deployed to 2525-node-upgrade November 4, 2022 10:53 Inactive
@github-actions github-actions bot had a problem deploying to storybook 2525-node-upgrade November 4, 2022 10:53 Failure
@github-actions github-actions bot temporarily deployed to 2525-node-upgrade November 4, 2022 11:15 Inactive
@github-actions github-actions bot temporarily deployed to storybook 2525-node-upgrade November 4, 2022 11:15 Inactive
@lkostrowski
Copy link
Member

cc @zaiste xmas is earlier 🎁 ;)

.npmrc Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to 2525-node-upgrade November 4, 2022 12:20 Inactive
@github-actions github-actions bot temporarily deployed to storybook 2525-node-upgrade November 4, 2022 12:20 Inactive
@github-actions github-actions bot temporarily deployed to 2525-node-upgrade November 4, 2022 13:03 Inactive
@github-actions github-actions bot temporarily deployed to storybook 2525-node-upgrade November 4, 2022 13:03 Inactive
@zaiste
Copy link
Contributor

zaiste commented Nov 5, 2022

cc @zaiste xmas is earlier 🎁 ;)

This can be one of the best presents I ever received ;)

@krzysztofzuraw krzysztofzuraw marked this pull request as ready for review November 7, 2022 15:21
@krzysztofzuraw krzysztofzuraw requested a review from a team November 7, 2022 15:21
@krzysztofzuraw krzysztofzuraw requested a review from a team as a code owner November 7, 2022 15:21
@krzysztofzuraw krzysztofzuraw requested review from a team, orzechdev, Droniu and andrzejewsky and removed request for a team November 7, 2022 15:21
.npmrc Show resolved Hide resolved
.nvmrc Outdated Show resolved Hide resolved
@NyanKiyoshi NyanKiyoshi mentioned this pull request Nov 8, 2022
27 tasks
andrzejewsky
andrzejewsky previously approved these changes Nov 9, 2022
Copy link
Member

@andrzejewsky andrzejewsky left a comment

Choose a reason for hiding this comment

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

So much gratefulness within one PR <3 see @krzysztofzuraw you made them a day :D

Let's test this carefully. The node is just a builder for us so if the building process works we can merge it

@github-actions github-actions bot temporarily deployed to 2525-node-upgrade November 9, 2022 15:33 Inactive
@github-actions github-actions bot temporarily deployed to storybook 2525-node-upgrade November 9, 2022 15:33 Inactive
@github-actions github-actions bot temporarily deployed to 2525-node-upgrade November 10, 2022 10:46 Inactive
@github-actions github-actions bot temporarily deployed to storybook 2525-node-upgrade November 10, 2022 10:46 Inactive
szczecha
szczecha previously approved these changes Nov 10, 2022
@szczecha szczecha self-requested a review November 10, 2022 11:54
NyanKiyoshi
NyanKiyoshi previously approved these changes Nov 10, 2022
@krzysztofzuraw krzysztofzuraw mentioned this pull request Nov 15, 2022
@krzysztofzuraw krzysztofzuraw removed the run e2e Runs cypress end-to-end tests label Nov 15, 2022
Copy link
Contributor

@karolm-saleor karolm-saleor left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@andrzejewsky andrzejewsky left a comment

Choose a reason for hiding this comment

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

to the moon 🚀

@krzysztofzuraw krzysztofzuraw merged commit 5bd79d9 into main Nov 15, 2022
@krzysztofzuraw krzysztofzuraw deleted the 2525-node-upgrade branch November 15, 2022 14:41
krzysztofzuraw added a commit that referenced this pull request Nov 21, 2022
Co-authored-by: Karolina Rakoczy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update node to version 18
10 participants