Skip to content

upgrading node to v20#8066

Open
The-Alchemist wants to merge 1 commit intocodecombat:masterfrom
The-Alchemist:fix/node-upgrade
Open

upgrading node to v20#8066
The-Alchemist wants to merge 1 commit intocodecombat:masterfrom
The-Alchemist:fix/node-upgrade

Conversation

@The-Alchemist
Copy link
Copy Markdown
Contributor

@The-Alchemist The-Alchemist commented Aug 13, 2025

It appears Github CI and CircleCI have all been upgraded to v20.

Also, apt update doesn't work anymore for this base docker image (v16) because Debian Buster is EOL:

E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file.

Summary by CodeRabbit

  • Chores
    • Updated the development Docker image to use Node.js 20 as the base runtime across environments.
    • Existing setup steps remain unchanged, including Ruby/rbenv and npm prefix configuration.
    • No user-facing changes; application functionality and interfaces are unaffected.
    • Builds and container workflows continue to operate as before.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 13, 2025

Walkthrough

The Docker base image in development/docker/Dockerfile was updated from node:16 to node:20. All other Dockerfile instructions, including Ruby/rbenv setup and npm prefix configuration, remain unchanged. No exported or public entities were modified.

Changes

Cohort / File(s) Summary
Docker Environment
development/docker/Dockerfile
Update base image from node:16 to node:20; other instructions unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Fix Dockerfile #7649 — Earlier upgrade of the same Dockerfile’s Node base image to node:16; this PR continues the progression to node:20.
  • upgrade to node20 #8014 — Project-wide Node 20 upgrade in CI/.nvmrc/package.json; complements this Docker base image update.

Suggested reviewers

  • mrfinch

Poem

Thump-thump goes my dev-box heart,
Hopped from 16 to 20—clean and smart.
Carrots cached, layers light,
Building burrows through the night.
With Node anew, I twitch my nose—
Ship the image, off it goes! 🥕🐇

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
development/docker/Dockerfile (1)

18-19: Ensure global npm binaries are on PATH

After setting a custom npm prefix, add its bin directory to PATH so global CLI tools are usable.

 RUN mkdir $NPM_GLOBAL_PREFIX && \
     npm config set prefix $NPM_GLOBAL_PREFIX --global
+ENV PATH=$NPM_GLOBAL_PREFIX/bin:$PATH
🧹 Nitpick comments (3)
development/docker/Dockerfile (3)

9-13: Reduce image size and avoid interactive installs

Use --no-install-recommends and clean apt lists to keep the image lean and deterministic.

-RUN apt-get update && \
-    apt-get install -y git curl libssl-dev libreadline-dev zlib1g-dev autoconf bison \
-                       build-essential libyaml-dev libncurses5-dev \
-                       libffi-dev libgdbm-dev && \
+RUN apt-get update && \
+    apt-get install -y --no-install-recommends git curl libssl-dev libreadline-dev zlib1g-dev autoconf bison \
+                       build-essential libyaml-dev libncurses5-dev \
+                       libffi-dev libgdbm-dev && \
     curl -sL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-installer | bash -
+RUN rm -rf /var/lib/apt/lists/*

15-16: Ruby 2.6.1 is EOL and incompatible with OpenSSL 3 (on bookworm)

If keeping FROM node:20 (bookworm), Ruby 2.6.1 will not build due to OpenSSL 3. Consider:

  • Preferred: Upgrade Ruby to ≥ 3.1 (e.g., 3.2.x or 3.3.x), which supports OpenSSL 3.
  • Interim: Keep Ruby 2.6.1 and use a bullseye-based image as suggested on Line 1.

Example if upgrading Ruby:

-ARG RUBY_VERSION=2.6.1
+ARG RUBY_VERSION=3.2.5

Verify downstream tooling, gems, and app code are compatible before bumping Ruby.


13-13: Pin rbenv-installer to a specific revision for supply-chain stability

Fetching the installer via a moving HEAD on raw GitHub can change over time. Pin to a commit SHA and enforce TLS settings.

Example:

-    curl -sL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-installer | bash -
+    curl -fsSL --proto '=https' --tlsv1.2 \
+      https://raw.githubusercontent.com/rbenv/rbenv-installer/<pinned-commit>/bin/rbenv-installer | bash -

Replace with a vetted commit hash.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c75e9e and 43df5da.

📒 Files selected for processing (1)
  • development/docker/Dockerfile (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ESLint CI

@@ -1,4 +1,4 @@
FROM node:16
FROM node:20
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Pin Debian variant to avoid Ruby 2.6/OpenSSL 3 build breakage

node:20 defaults to a newer Debian (commonly bookworm) with OpenSSL 3. Ruby 2.6.1 cannot build against OpenSSL 3 and will fail during rbenv install. Either upgrade Ruby to a version supporting OpenSSL 3 (Ruby ≥ 3.1), or pin the base image to a Debian release that still ships OpenSSL 1.1 (bullseye) for compatibility.

Minimal change to keep current Ruby working:

-FROM node:20
+FROM node:20-bullseye

If you prefer upgrading Ruby instead, see my note on Lines 15-16.


🏁 Script executed:

#!/bin/bash
# Inspect Dockerfile for Ruby setup and base image
echo "----- Dockerfile (first 200 lines) -----"
sed -n '1,200p' development/docker/Dockerfile

echo "----- rbenv references -----"
grep -R "rbenv" -n development/docker || true

echo "----- ruby references -----"
grep -R "ruby" -n development/docker || true

Length of output: 1322


🌐 Web query:

Which Debian release is the official Docker Hub “node:20” image based on by default?

💡 Result:

The official node:20 image is Debian 12 — the "bookworm" release (i.e. node:20 → node:20-bookworm by default). (github.com)

(If you need a different Debian base or a smaller image, use an explicit tag such as node:20-bookworm-slim, node:20-bullseye, or node:20-slim.)

Citations:


Pin Docker base image to Debian Bullseye for Ruby 2.6.1 compatibility

Ruby 2.6.1 installed via rbenv cannot compile against OpenSSL 3 in Debian 12 (Bookworm). To keep the existing Ruby version working, pin the Node 20 image to Bullseye (which ships OpenSSL 1.1).

• development/docker/Dockerfile: line 1

-FROM node:20
+FROM node:20-bullseye
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
FROM node:20
FROM node:20-bullseye
🤖 Prompt for AI Agents
development/docker/Dockerfile lines 1-1: The base image needs to be pinned to
Debian Bullseye to avoid OpenSSL 3 incompatibility with Ruby 2.6.1; update the
FROM line to a Bullseye-based Node 20 tag (for example change FROM node:20 to
FROM node:20-bullseye or node:20-bullseye-slim), save the Dockerfile and rebuild
the development image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant