-
-
Notifications
You must be signed in to change notification settings - Fork 944
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
Upgrade Node 14 to Node 20 #1439
Conversation
Upgrade Node from 14 to 16 and associated packages and WebPack config
A few CSS issues are appearing, so will work on that. |
If we're making the effort to upgrade node/webpack & friends, maybe this should be updated to the latest stable release of node, not 16, unless there's something that's being blocked with staying on 14 (are these the custom frontend packages?) |
The logic behind moving to 16 was to reduce the blast radius of such a large jump between 14 to 18. However, 16 is still EOL so best practice would be to move to 18. I will give it a try and see what the impact is. It should hopefully be easier* (famous last words) since I have done the move to 16 essentially. Later versions of Uppy and webpack 5 aren't happy with Node 14 hence the upgrade. |
Upgraded to node 18 and Webpack 5. Package cleanup for webpack 5
@pierotofy in theory Node 18 and webpack 5. Please have a review and let me know if you have any questions or comments. |
@chris-bateman -- any reason why 21.04 instead of LTS 22.04? No comments otherwise and a happy to test. Thanks for this! |
Didn't touch the docker file Ubuntu version as I didn't want to change too many things. I was going to consider changing that in another PR. But overall I do agree a bump there would be good. |
Ah, I forgot that was 21 already! Yeah, a bump if possible is always good, but not changing everything at once is useful. Edit: |
@smathermather quick note about a bump to the Ubuntu version. I just gave it a try and it's more than a 1 line fix. A few packages need to be adjusted. So yeah that will be a to do item for another time. Let me know if anything else is needed for this to be merged and released. |
If there's no objection, I'll merge today. |
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.
Is the version number showing as 3.0.0 in the about section? |
Hmm. Nope. Looks like somehow I built wrong. |
Added buffer as webpack 5 does not use it anymore. Version change in package.json
bump to node 20
Latest run failed but just due to a network timeout connecting to Ubuntu. Happens every now and then. |
Thanks for the additional changes, but this is now breaking shapefile import in the map view. You should be able to drag & drop zipped shapefiles into a project (test files and link to a working instance of WebODM included). https://cloud1.webodm.net/public/task/329b1d24-826e-4cbf-a220-2e19be0349e1/map/ If you've upgraded webpack, test whether you've accidentally broken anything Javascript related. If you add a polyfill for Buffer, search for anything related to Buffer (in this case, shapefile import, perhaps other stuff) 🙏 |
@pierotofy -- do we maintain a list of things to test (recognising this might have been caught without such a list). If not, I can at least go through pull requests and make a list of things that have broken as a starting place and we can build from there. |
Thanks for testing. Comments noted and appreciated. As @smathermather mentions above, a test list would be appreciated. This could then be expanded into a test suite like Playwright in the future, for example. I will review the impact of upgrading to WebPack 5 in more detail on a code level. |
We have a minimal test suite for the frontend, but it's nowhere near exhaustive (see all .test.jsx files). Manual testing is still required. |
This particular issue is now fixed. I will push the commit shortly. Please feel free to test further. I will continue checking a few things in other sections of the frontend as well. |
Do we need more testing on this? Happy to run some tests if so. |
I am using it for the day to day ASDC workloads without issue but they are probably vastly different from day to day "vanilla" usage. Maybe release a beta to common power users? |
Is there something other than throwing the |
Yes.
Then |
Cool. In that case currently running this as a daily and have been for a few days. Though version still shows as 2.4.0, which is a bit confusing. Perhaps I'm not running it? Sorry for the confusion: I never touch WebODM, always ODM or NodeODM for testing, so I'm a very old n00b. |
2.4.0 is right. I changed it to that from 3.
…Sent from my Galaxy
-------- Original message --------
From: Stephen Mather ***@***.***>
Date: 9/12/23 12:27 am (GMT+10:00)
To: OpenDroneMap/WebODM ***@***.***>
Cc: Chris Bateman ***@***.***>, Mention ***@***.***>
Subject: Re: [OpenDroneMap/WebODM] Upgrade Node 14 to Node 20 (PR #1439)
Yes.
docker build -t opendronemap/webodm_webapp .
Then ./webodm.sh start --dev
Cool. In that case currently running this as a daily (for real this time). Though version still shows as 2.4.0, which is a bit confusing. Perhaps I'm not running it?
Sorry for the confusion: I never touch WebODM, always ODM or NodeODM for testing, so I'm a very old n00b.
—
Reply to this email directly, view it on GitHub<#1439 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC5EAF2KTH3WBHWJQVLMS7DYIMIT7AVCNFSM6AAAAAA7SCVKWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXGE3DINZYGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Still running in production over here without issue, but I've asked @Saijin-Naib to kick the tires a bit too as I haven't had time to do any deeper testing yet. |
Oh, you want me to break stuff? That I can do 🤣 |
Still running as my daily, so far without incident. @Saijin-Naib -- any chance to kick the tires? |
Not yet! |
Still not seeing any issues running this on the daily. Do we have any remaining reservations about this pull request? |
I think it's good. Thank you @chris-bateman 🙏 |
Happy new year everyone thanks for taking the time to test this. |
Now upgraded to node 20 and webpack 5
Upgrade Node from 14 to 16 and associated packages and WebPack config.
The proposed change is because Node 14 is EOL and some packages are no longer supported.
https://endoflife.date/nodejs
Node 16 is still EOL but I wanted to introduce these changes gradually.
Node is now installed in the Dockerfile using the modern install method. The old script method is deprecated.
Replace ExtractTextPlugin with MiniCssExtractPlugin due to it being deprecated -
I upgraded WebPack slightly to ensure MiniCssExtractPlugin works.
Dockerfile compiled correctly on local system.
Tests completed successfully on local system.
ASDC Disclaimer - These changes will benefit the ASDC fork for supporting some custom frontend packages.