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

🌱 Update project to use nodejs 20, npm >=10.5.2 #2062

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Conversation

sjd78
Copy link
Member

@sjd78 sjd78 commented Aug 22, 2024

Upgrade the project to use nodejs-20 in the Dockerfile, and package.json engine block. More specific entries for .dockerignore will help keep the COPY step quick (especially for local dev image builds).

Reasoning:

  • nodejs-18 is in LTS until May 2025, but nodejs-20 will be in LTS until May 2026. 1

  • node and npm are distributed together, and the ubi9/nodejs-20 container has a newer version of npm included (10.7.0) than the current ubi9/nodejs-18 container (10.5.0)

  • Given github issues 2 and 3, we can assume that the only versions of npm that will be stable in CI during the npm install phase are npm@9 and npm@>=10.5.2. Any npm version <10.5.2 is at severe risk of encountering network errors when installing packages, especially when running in a qemu environment for non-native architecture builds.

  • Being very specific in the package.json engines block will help keep everyone on working versions of npm.

Footnotes

  1. https://nodejs.org/en/about/previous-releases

  2. https://github.com/npm/cli/issues/7231

  3. https://github.com/npm/cli/issues/7072

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.53%. Comparing base (b654645) to head (6ca3fa4).
Report is 216 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2062      +/-   ##
==========================================
+ Coverage   39.20%   42.53%   +3.33%     
==========================================
  Files         146      171      +25     
  Lines        4857     5504     +647     
  Branches     1164     1305     +141     
==========================================
+ Hits         1904     2341     +437     
- Misses       2939     3147     +208     
- Partials       14       16       +2     
Flag Coverage Δ
client 42.53% <ø> (+3.33%) ⬆️
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@sjd78
Copy link
Member Author

sjd78 commented Aug 22, 2024

For reference:

> podman run -it --rm registry.access.redhat.com/ubi9/nodejs-20:1-54 npm version
{
  npm: '10.7.0',
  node: '20.14.0',
  acorn: '8.11.3',
  ada: '2.7.8',
  ares: '1.28.1',
  base64: '0.5.2',
  brotli: '1.0.9',
  cjs_module_lexer: '1.2.2',
  cldr: '45.0',
  icu: '75.1',
  llhttp: '8.1.2',
  modules: '115',
  napi: '9',
  nghttp2: '1.61.0',
  openssl: '3.0.7',
  simdutf: '5.2.8',
  tz: '2024a',
  undici: '6.13.0',
  unicode: '15.1',
  uv: '1.46.0',
  uvwasi: '0.0.21',
  v8: '11.3.244.8-node.23',
  zlib: '1.2.11'
}

> podman run -it --rm registry.access.redhat.com/ubi9/nodejs-18:1-118 npm version
{
  npm: '10.5.0',
  node: '18.20.2',
  acorn: '8.10.0',
  ada: '2.7.6',
  ares: '1.27.0',
  base64: '0.5.2',
  brotli: '1.0.9',
  cjs_module_lexer: '1.2.2',
  cldr: '44.1',
  icu: '74.2',
  llhttp: '6.1.1',
  modules: '108',
  napi: '9',
  nghttp2: '1.57.0',
  openssl: '3.0.7',
  simdutf: '4.0.8',
  tz: '2024a',
  undici: '5.28.4',
  unicode: '15.1',
  uv: '1.44.2',
  uvwasi: '0.0.19',
  v8: '10.2.154.26-node.36',
  zlib: '1.2.11'
}

@sjd78 sjd78 added the cherry-pick/release-0.5 This PR should be cherry-picked to release-0.4 branch. label Aug 27, 2024
Upgrade the project to use nodejs-20 in the `Dockerfile`,
and package.json engine block.  More specific entries
for `.dockerignore` will help keep the `COPY` step quick.

Reasoning:
  - nodejs-18 is in LTS until May 2025, but nodejs-20 will
    be in LTS until May 2026. [^1]

  - node and npm are distributed together, and the
    `ubi9/nodejs-20` container has a newer version of
    npm included (10.7.0) than the current `ubi9/nodejs-18`
    container (10.5.0)

  - Given github issues [^2] and [^3], we can assume that
    the only versions of npm that will be stable in CI
    during the `npm install` phase are `npm@9` and `npm@>=10.5.2`.
    Any npm version <10.5.2 is at severe risk of encountering
    network errors when installing packages, especially when
    running in a qemu environment for non-native architecture
    builds.

  - Being very specific in the `package.json` `engines` block
    will help keep everyone on working versions of npm.

[^1]: https://nodejs.org/en/about/previous-releases
[^2]: npm/cli#7231
[^3]: npm/cli#7072

Signed-off-by: Scott J Dickerson <[email protected]>
@sjd78 sjd78 merged commit 5d6e100 into konveyor:main Aug 27, 2024
13 checks passed
@sjd78 sjd78 deleted the node20 branch August 27, 2024 18:41
sjd78 added a commit to sjd78/tackle2-ui that referenced this pull request Aug 27, 2024
Upgrade the project to use nodejs-20 in the `Dockerfile`, and
package.json engine block. More specific entries for `.dockerignore`
will help keep the `COPY` step quick (especially for local dev image
builds).

Reasoning:
  - nodejs-18 is in LTS until May 2025, but nodejs-20 will be in LTS until
    May 2026. [^1]

  - node and npm are distributed together, and the `ubi9/nodejs-20`
    container has a newer version of npm included (10.7.0) than the current
    `ubi9/nodejs-18` container (10.5.0)

  - Given github issues [^2] and [^3], we can assume that the only
    versions of npm that will be stable in CI during the `npm install` phase
    are `npm@9` and `npm@>=10.5.2`. Any npm version <10.5.2 is at severe
    risk of encountering network errors when installing packages, especially
    when running in a qemu environment for non-native architecture builds.

  - Being very specific in the `package.json` `engines` block will help
    keep everyone on working versions of npm.

[^1]: https://nodejs.org/en/about/previous-releases
[^2]: npm/cli#7231
[^3]: npm/cli#7072

Backport-of: konveyor#2062
Signed-off-by: Scott J Dickerson <[email protected]>
sjd78 added a commit that referenced this pull request Aug 28, 2024
Upgrade the project to use nodejs-20 in the `Dockerfile`, and
package.json engine block. More specific entries for `.dockerignore`
will help keep the `COPY` step quick (especially for local dev image
builds).

Reasoning:
  - nodejs-18 is in LTS until May 2025, but nodejs-20 will be in LTS until
    May 2026. [^1]

  - node and npm are distributed together, and the `ubi9/nodejs-20`
    container has a newer version of npm included (10.7.0) than the current
    `ubi9/nodejs-18` container (10.5.0)

  - Given github issues [^2] and [^3], we can assume that the only
    versions of npm that will be stable in CI during the `npm install` phase
    are `npm@9` and `npm@>=10.5.2`. Any npm version <10.5.2 is at severe
    risk of encountering network errors when installing packages, especially
    when running in a qemu environment for non-native architecture builds.

  - Being very specific in the `package.json` `engines` block will help
    keep everyone on working versions of npm.

[^1]: https://nodejs.org/en/about/previous-releases
[^2]: npm/cli#7231
[^3]: npm/cli#7072

Backport-of: #2062
Signed-off-by: Scott J Dickerson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick/release-0.5 This PR should be cherry-picked to release-0.4 branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants