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

[HOLD for payment 2023-11-29] Bump E/App and Onyx to use NodeJS 20.9.0 LTS #25824

Closed
fabioh8010 opened this issue Aug 24, 2023 · 30 comments
Closed
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 NewFeature Something to build that is a new item.

Comments

@fabioh8010
Copy link
Contributor

Problem

Both E/App and Onyx repos currently enforces developers to use NodeJS 16.15.1. As of September, NodeJS 16.x will reach its End-of-life (EOL), meaning there will be no more updates, patches, or security fixes. Additionally, the future React Native 0.73 version will require using NodeJS 18.x.

Using an outdated version of NodeJS not only exposes the application to potential security vulnerabilities, compatibility issues, and prevents developers from leveraging the latest features, optimizations, and improvements available in newer versions of NodeJS, but it will also block us from updating the App to RN 0.73 or higher versions.

Solution

Upgrade both repos to require NodeJS 18.17.1 (or 18.x) and NPM 9.6.7. This will ensure that the application remains secure, compliant, in line with best practices for software development and will allows us to continue updating our app to latest RN versions.

Plan

For react-native-onyx:

  1. Change package.json to require NodeJS 18.17.1 and NPM 9.6.7.
    1. Alternatively, since this is a open-source library we could relax the version enforcement to only 18.x, in this way developers/companies who uses Onyx don't need to use a strict version, just the LTS release.
  2. Change .nvmrc to require 18.17.1 (or v18).
  3. Change publish.yml, test.yml and lint.yml to use the node version from .nvmrc file instead of hardcoded version.

For E/App:

  1. Change package.json to require NodeJS 18.17.1 and NPM 9.6.7.
  2. Change .nvmrc to require 18.17.1.
  3. Change TestSpec.yml to use .nvmrc (if possible) or 18.17.1.
  4. Fix build-desktop.sh to drop npm bin usage since it was removed in NPM 9.x, and use npx instead.

Tests

I forked Onyx to use 18.17.1 and used my own release in E/APP in order to test the changes and I was able to install the dependencies and build for all platforms. When running tests I got some dependency errors about node version mismatched in installed packages, was able to resolve the issues by running npm rebuild (probably just removing node_modules and reinstalling would work as well).

I also didn't have any issues with dependencies auto-updating or changing package-lock.json.

@fabioh8010 fabioh8010 added Daily KSv2 NewFeature Something to build that is a new item. labels Aug 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 24, 2023

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Aug 24, 2023
@fabioh8010
Copy link
Contributor Author

@AndrewGable
Copy link
Contributor

Looks great!

@Tony-MK
Copy link
Contributor

Tony-MK commented Aug 24, 2023

Hey, I would love to work on the issue. Can I get assigned? Do I need to post proposal?

@AndrewGable
Copy link
Contributor

@fabioh8010 is assigned and will be working on this one. 👍

@fabioh8010
Copy link
Contributor Author

@AndrewGable

@pac-guerreiro Will take the issue over! Could you assign him?

@roryabraham roryabraham changed the title Bump E/App and Onyx to use NodeJS 18.17.1 LTS [HOLD] Bump E/App and Onyx to use NodeJS 18.17.1 LTS Sep 4, 2023
@roryabraham
Copy link
Contributor

On HOLD until after the merge freeze

@AndrewGable
Copy link
Contributor

@fabioh8010 - Can you have him comment here? Thanks.

@melvin-bot melvin-bot bot added the Overdue label Sep 5, 2023
@pac-guerreiro
Copy link
Contributor

Hi @AndrewGable, I can take this 😄

@melvin-bot melvin-bot bot removed the Overdue label Sep 6, 2023
@roryabraham
Copy link
Contributor

BTW, I think this issue is a bit lower urgency, so due of the backlog of issues that we have been HOLDing the last couple weeks, I suggest that we wait until a few days after the merge freeze is lifted to take this off HOLD. That way we don't have a huge amount of PRs merged all on the same day and end up with a massive release that's very hard to ship

@melvin-bot melvin-bot bot added the Overdue label Sep 15, 2023
@kevinksullivan
Copy link
Contributor

What's the latest here @pac-guerreiro ?

@melvin-bot melvin-bot bot removed the Overdue label Sep 21, 2023
@pac-guerreiro
Copy link
Contributor

@kevinksullivan still waiting for my PR to be merged with Onyx. After it, it should be safe to merge my PR to Expensify App 😄

@melvin-bot melvin-bot bot added the Overdue label Oct 2, 2023
@pac-guerreiro
Copy link
Contributor

Onyx is now using Node 18!

I'm going to create a PR to bump E/App to Node 18!

@pac-guerreiro
Copy link
Contributor

@dylanexpensify @roryabraham The PR for Onyx is now open! The one for the app will remain in draft until the Onyx one is merged because until this happens, the app will throw compatibility errors with Onyx because of node version

@melvin-bot melvin-bot bot removed the Overdue label Nov 13, 2023
@pac-guerreiro
Copy link
Contributor

@DylanDylann @roryabraham

I addressed the feedback on the PR for Onyx! Let me know if there is anything else that needs to be taken care of and sorry for the time this has been taking to be merged.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Nov 15, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Nov 16, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Nov 17, 2023
@roryabraham
Copy link
Contributor

This is done now, just awaiting deploy to production (even though it mostly affects dev/test environments)

@AndrewGable
Copy link
Contributor

@roryabraham - Can you send an action required email to internal engineers on this?

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 22, 2023
@melvin-bot melvin-bot bot changed the title Bump E/App and Onyx to use NodeJS 20.9.0 LTS [HOLD for payment 2023-11-29] Bump E/App and Onyx to use NodeJS 20.9.0 LTS Nov 22, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 22, 2023
Copy link

melvin-bot bot commented Nov 22, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Nov 22, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.1-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-11-29. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Nov 22, 2023

BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@pac-guerreiro] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 28, 2023
@roryabraham
Copy link
Contributor

Looks like none of the PRs underwent C+ review, so we can close this.

@roryabraham
Copy link
Contributor

No regression tests needed

@roryabraham
Copy link
Contributor

Can you send an action required email to internal engineers on this?

I think @arosiclair sent one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 NewFeature Something to build that is a new item.
Projects
None yet
Development

No branches or pull requests

6 participants