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

Remove Node 14 support in Device Agent 3.x due to 'inflight' deprecation #263

Closed
knolleary opened this issue May 24, 2024 · 4 comments · Fixed by #316
Closed

Remove Node 14 support in Device Agent 3.x due to 'inflight' deprecation #263

knolleary opened this issue May 24, 2024 · 4 comments · Fixed by #316
Labels
customer request requested by customer
Milestone

Comments

@knolleary
Copy link
Member

As of May 23rd, the inflight module has been deprecated. This means users now see the following warning when they install the module:

npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.

The module is deep in the mqtt module dependency tree (see below), but more importantly, it is not in the functional code path of the device agent. So our end users are in no way impacted.

However, that install warning is alarming and has already triggered support questions within a day of the deprecation. Ideally we need to remove it from our dependency tree. However, that brings some complication.

The module is in the dependency tree of [email protected]. It is not in the dependency tree of [email protected] - however, 5.x drops support for Node 14 - something we want to try to keep for some of the device manufacturers in the ecosystem. I think it is unlikely that the mqtt project will accept a patch for the 4.x stream - they haven't done any maintenance releases on it since 5.x was released two years ago.

This was a somewhat inevitable outcome whilst trying to keep support for such an old version of node.js.

We have two options:

  1. Do nothing other than document it. No-one reads the docs, but at least there will be an answer to be found when searching.
  2. Update mqtt to 5.x and drop support for Node 14.

Moving forward, option 2 feels the only way forward. Node 14 is very old and this is only going to be the first of many such cases where fixes are not made available in older versions of our dependencies.

I propose we bump the Device Agent to 3.x. We can still support Device Agent 2.x on Node 14, but will be in maintenance mode (unless there is a specific business need to backport something).

@knolleary knolleary moved this to Todo in 🛠 Development Aug 1, 2024
@knolleary knolleary added the customer request requested by customer label Aug 1, 2024
@knolleary knolleary added this to the 2.8 milestone Aug 1, 2024
@knolleary
Copy link
Member Author

We have had enquires regarding our plan to eliminate the deprecated dependencies. Whilst it still holds true they are not in any functional code path used by the Device Agent, the presence of the deprecation warnings is being flagged as a blocker to deploy the module for some users.

Adding to the 2.8 scheduled to get resolved.

@Steve-Mcl
Copy link
Contributor

@joepavitt joepavitt modified the milestones: 2.8, 2.9 Aug 29, 2024
@hardillb
Copy link
Contributor

Just double checking how far are we going here? Drop 14 and 16 and go to 18 minimum or keep 16?

@knolleary
Copy link
Member Author

Node 18 minimum - same as NR 4.

@github-project-automation github-project-automation bot moved this from Review to Done in 🛠 Development Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer request requested by customer
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants