-
Notifications
You must be signed in to change notification settings - Fork 72
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
Test with Node 20, updated deps + js-wacz #3486
Test with Node 20, updated deps + js-wacz #3486
Conversation
How I tested these changes: - `docker compose up -d --build` to force a rebuild - In the web container's shell: - `npm run build` does generate valid (?) bundles - `invoke run` does run `npm run build` - `npx js-wacz --help` prints js-wacz's help menu
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3486 +/- ##
========================================
Coverage 71.22% 71.22%
========================================
Files 48 48
Lines 6512 6512
========================================
Hits 4638 4638
Misses 1874 1874 ☔ View full report in Codecov by Sentry. |
This looks great!!! I tested by:
I can't think of anything else to check!! |
perma_web/Dockerfile
Outdated
RUN curl -o nodejs.deb https://deb.nodesource.com/node_14.x/pool/main/n/nodejs/nodejs_14.19.3-deb-1nodesource1_$(dpkg --print-architecture).deb \ | ||
&& dpkg -i ./nodejs.deb \ | ||
&& rm nodejs.deb | ||
# node.js (needs to be pinned?) |
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 recommend pinning everything in docker, ideally to the version in prod -- anything you don't pin will eventually waste an hour when it breaks on CI instead of on your local, or breaks on prod instead of CI. If keeping the pin updated is wasting more time than that I could be talked out of it.
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.
The mechanism for installing node has changed; I believe it's no longer possible to pin to a specific .deb file exactly like we used to; the new mechanism is at nodesource/distributions#33 (comment)
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.
ideally to the version in prod
I note that we do not run nodejs in prod for Perma: it only ever runs inside the docker container
Without pinning here, I think the biggest possible consequences are, a discrepancy between different developers' environments, and an accidental upgrade to a new minor release breaking something that was previously working. Neither of those feel like big risks to me.
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.
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.
Yep, I think this is fair @jcushman - I personally feel okay using this Node.js 20.x installer unpinned since it Node 20 is already in LTS mode. That of course doesn't mean it's not going to receive an update that is going to break our setup, but makes it less likely 😅 ?
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.
@bensteinberg @jcushman I believe this would work, should I push and see if it actually does?
# node.js
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs=20.12.0-1nodesource1
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.
Perfect, I was about to make this exact suggestion, and point out that I just installed Debian updates for node on a few machines.
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.
@matteocargnelutti is there a build relic to remove after the fact, like the rm
move we had before? asking just because this image is so big
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.
@rebeccacremona As in: it got much bigger with that change? I am not sure 👀 !
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.
@matteocargnelutti no, I just saw that there wasn't an rm
or clean
or whatever and thought maybe that was by accident. Ben just checked and it is no big deal, so never mind :-)
This is awesome -- I think ship it if Ben is happy? As Becky points out we use pre-built assets in production, so the testing she did is likely to have found any problems that might exist. |
Thank you all for having a look and for the helpful feedback 👋 |
How I tested these changes:
docker compose up -d --build
to force a rebuildnpm run build
does generate valid (?) bundlesinvoke run
successfully runsnpm run build
npx js-wacz --help
prints js-wacz's help menuTests are passing and the app behaves normally when tested locally.