Conversation
Workaround for @rails/webpacker v5.x on NodeJS 17 or newer, due to the OpenSSL upgrade in these newer versions of NodeJS, along with webpacker using a deprecated hashing function.
With the "NODE_OPTIONS=--openssl-legacy-provider" workaround, we are able to run on NodeJS 18 or 20 now. Bump to the newest LTS we are compatible with.
|
Other than the one known failure from before, CI is passing. Manual testing worked fine, even for the functionality tested by the "failing" test case. Searching from the splash page (AKA homepage) "just works". Still not sure why that's broken in testing, since it does work in manual testing. But I'm inclined to ignore that apparently test-only failure if it allows getting us on newer dependencies/runtime versions. And, for what it's worth, upgrading all outdated ruby gems with Tried tweaking the tests slightly to see if it's an issue with the test logic, but I've personally had no luck with that yet, either. |
|
If we can test this on a dyno on the main Heroku account for the project, that would add confidence in the Node 17+ workaround "just working" as I have it set in If other maintainers can't help out with this, I'll be looking at paying $5 for an "eco dyno" on my personal Heroku account to see how it goes. Would love to avoid paying Heroku money just for the privilege of testing the app, but that may just be how it is. Will also let me run the Rails 7 upgrade PR through some paces on Heroku as well if I do that, though I'll note I haven't set up a postgresql DB in Heroku before, I don't think I'd know how, and that costs even more, so anything to do with actually hitting the DB won't work in my test dyno. That limits what I can really test with it, but at least it's something. At minimum, I can confirm whether this workaround works. Success criterion for testing: The app's JS compiles successfully. (i.e. the app deploys to the dyno and doesn't go up in smoke, basically works.) The env var is only needed by Webpacker to compile, apparently. Or so I have heard. It may be possible to unset the env var after compiling, even. Anyway, this remains to be seen. |
Context
--openssl-legacy-provider, via theNODE_OPTIONSenv var, so we can bump to newer NodeJS (Node v20.x, specifically).Summary of Changes
NODE_OPTIONS=--openssl-legacy-providerenv var for development (Dockerfile) and production (app.json).Dockerfile) and production (enginesfield ofpackage.json).Checklist