Skip to content

chore: Added Node.js 24 support #3080

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

Merged
merged 11 commits into from
Jun 25, 2025
Merged

chore: Added Node.js 24 support #3080

merged 11 commits into from
Jun 25, 2025

Conversation

jsumners-nr
Copy link
Contributor

@jsumners-nr jsumners-nr commented May 6, 2025

This PR resolves #3095 and also resolves #3096.

All smoke tests are passing for me locally.

@bizob2828
Copy link
Member

Just a FYI you'll have to run smoke tests and security versioned tests locally as they aren't getting invoked here. I can help you with the smoke tests in the morning as they require some env vars to be set

Copy link

codecov bot commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.59%. Comparing base (51b82aa) to head (d01bdfb).
Report is 14 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3080       +/-   ##
===========================================
+ Coverage   80.40%   97.59%   +17.18%     
===========================================
  Files         329      339       +10     
  Lines       49792    51023     +1231     
===========================================
+ Hits        40037    49796     +9759     
+ Misses       9755     1227     -8528     
Flag Coverage Δ
integration-tests-cjs-18.x 73.91% <100.00%> (?)
integration-tests-cjs-20.x 73.90% <100.00%> (?)
integration-tests-cjs-22.x 73.94% <100.00%> (?)
integration-tests-cjs-24.x 74.58% <100.00%> (?)
integration-tests-esm-18.x 49.65% <0.00%> (-0.02%) ⬇️
integration-tests-esm-20.x 49.65% <0.00%> (-0.02%) ⬇️
integration-tests-esm-22.x 49.72% <0.00%> (?)
integration-tests-esm-24.x 51.33% <0.00%> (?)
unit-tests-18.x 88.35% <100.00%> (?)
unit-tests-20.x 88.35% <100.00%> (?)
unit-tests-22.x 88.35% <100.00%> (?)
unit-tests-24.x 88.35% <100.00%> (?)
versioned-tests-18.x 79.98% <100.00%> (-0.26%) ⬇️
versioned-tests-20.x 80.10% <100.00%> (-0.22%) ⬇️
versioned-tests-22.x 80.11% <100.00%> (-0.22%) ⬇️
versioned-tests-24.x 80.00% <100.00%> (?)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jsumners-nr
Copy link
Contributor Author

At least one blocker is newrelic/csec-node-agent#297

@bizob2828
Copy link
Member

At least one blocker is newrelic/csec-node-agent#297

It's weird because it's just warning on leaking event emitters. Some fail if you run the entire suite at once because of tests getting canceled, but if you run the versioned tests and only specify a package that's failing it's fine

@bizob2828
Copy link
Member

It looks like in 24.0.1 the versioned tests that assert CLM attributes are now failing. This is done via @contrast/fn-inspect, I'm trying to build that project locally and it's failing

@jsumners-nr
Copy link
Contributor Author

@bizob2828
Copy link
Member

@contrast/fn-inspect

Their CI needs to be updated https://github.com/Contrast-Security-Inc/node-fn-inspect/blob/3062b379a4a3842389eccd56c2429b5952d8ea5f/.github/workflows/test.yml#L24

Maybe, I've contributed to this project in the past as I've added support for 20 and 22. I'm trying to determine if my mac is messed up or 24 doesn't work

@jsumners-nr
Copy link
Contributor Author

Blocker 2 -- Contrast-Security-Inc/node-fn-inspect#78

@jsumners-nr
Copy link
Contributor Author

jsumners-nr commented May 13, 2025

The suites I'm having issues with under v24.0.0 in combination with the security client, right now, are:

  • bluebird -- That's at least partially due to the issue linked above, I believe -- test suite was taking roughly >= 78 seconds to run. This exceeded the time we allot to running single suites.
  • aws-sdk-v2 -- The "dax client" tests are flaky

@bizob2828
Copy link
Member

bizob2828 commented May 13, 2025

So when i run npm run versioned:security bluebird it times out on the methods.test.js in version 3.0.6. However, if I just run that file NEW_RELIC_SECURITY_AGENT_ENABLED=true node test/versioned/bluebird/methods.test.js it passes. The timeout on the test runner may have to be increased. I don't think the leaking of the event emitters has anything to do with it

@jsumners-nr jsumners-nr changed the title chore: Added Node.js 24 to CI jobs chore: Added Node.js 24 support May 13, 2025
@jsumners-nr jsumners-nr added the force-smoke Run smoke tests on a pull request. label May 19, 2025
@jsumners-nr jsumners-nr removed the force-smoke Run smoke tests on a pull request. label Jun 11, 2025
@jsumners-nr jsumners-nr marked this pull request as ready for review June 11, 2025 18:43
Copy link
Member

@bizob2828 bizob2828 left a comment

Choose a reason for hiding this comment

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

verified benchmark, smoke tests and versioned tests + security agent are working on Node 24.

@@ -6,7 +6,8 @@
"tests": [
{
"engines": {
"node": ">=18"
"node": ">=18 <24",
"comment": "https://github.com/restify/node-restify/issues/1984"
Copy link
Member

Choose a reason for hiding this comment

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

can you create a ticket to update this when restify makes a fix?

Copy link
Member

Choose a reason for hiding this comment

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

i see you signed off, i can log this

@bizob2828 bizob2828 merged commit a538c2a into newrelic:main Jun 25, 2025
49 of 51 checks passed
@github-project-automation github-project-automation bot moved this from Needs PR Review to Done: Issues recently completed in Node.js Engineering Board Jun 25, 2025
@jsumners-nr jsumners-nr deleted the node-24 branch June 26, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

Update @newrelic/native-metrics Support Node.js 24
2 participants