-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix xml parser prior to upgrading to node v22 #2656
Conversation
https://eaflood.atlassian.net/browse/WATER-4729 We want to upgrade to node v22, but we have a blocker with the xml parser we are using. The tool being used is libxmljs and has some open issues: libxmljs/libxmljs#664 libxmljs/libxmljs#660 Mainly the issues are: - is it being maintained - is there going to be a release to make it work with node v22. Rebuilding the package locally during our npm install has not worked, (through minimum effort) and if we did make it to build there is no guarantee it will actually work when built. This spike investigates the effort required to get any xml parser to work with the least possible effort. The change suggest using libxmljs2. Which works. However, if you look at the documentation it states : "LibXML bindings for node.js This package was forked as the original one is fairly unmaintained." Sounds good. But no it clearly now states it is "NO LONGER MAINTAINED". This can be a starting point to make a decision and we should not commit this branch. https://www.npmjs.com/package/xml-js looks a lot more popular and could do with a spike to assess the effort required to replace the existing parser. Lets discuss.
https://eaflood.atlassian.net/browse/WATER-4729 We were previously blocked from upgrading to node to v22 by a xml parser package not supporting it. The previous work to resolve this has been done here - #2656
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't actually want any changes. I think this is the right approach. I just don't want to merge it until we have tried deploying it to our AWS environment.
So bear with me!
I will mark as draft. For proof of it working i have created a v22 branch - #2657 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
I've deployed this to our AWS dev
environment and all seems to be well. Also, tested updating it locally and running npm ci
in our docker-base env and all seems well there.
So it's a from me!
On your wider point @jonathangoulding , this is one for the business. Essentially, our current implementation is not only unmaintained but also has vulnerabilities that will never be resolved. If we are to continue offering returns submission via XML, then we must However, knowing how little it is used, they may opt to work with the one user to help them migrate to one of our alternate methods. We can then drop the function and dependency altogether. I'll write something up so we have a chance of this issue not being forgotten. |
https://eaflood.atlassian.net/browse/WATER-4729 We were previously blocked from upgrading to node to v22 by a xml parser package not supporting it. The previous work to resolve this has been done here - #2656
https://eaflood.atlassian.net/browse/WATER-4729 We were previously blocked from upgrading to node to v22 by a xml parser package not supporting it. The previous work to resolve this has been done here - #2656
https://eaflood.atlassian.net/browse/WATER-4729
We want to upgrade to node v22, but we have a blocker with the xml parser we are using.
The tool being used is libxmljs and has some open issues:
Mainly the issues are:
Rebuilding the package locally during our npm install has not worked, (through minimum effort) and if we did make it to build there is no guarantee it will actually work when built.
This spike investigates the effort required to get any xml parser to work with the least possible effort.
The change suggest using libxmljs2. Which works.
However, if you look at the documentation it states : "LibXML bindings for node.js This package was forked as the original one is fairly unmaintained."
Sounds good. But now it clearly now states it is "NO LONGER MAINTAINED".