devcontainer: bump node version to 22 and update feature installation#1017
Conversation
WalkthroughThe development container setup was modified by updating the base image from 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (2)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.devcontainer/Dockerfile (1)
3-6: Minor: favour heredoc for multi-line JSON ‑ improves readability & escapes.-RUN mkdir -p /root/.hydro /data/file && \ - chown -R root:root /root /root/.hydro /data/file && \ - echo '{"uri":"mongodb://mongo/hydro"}' > /root/.hydro/config.json && \ - echo '["@hydrooj/ui-default","@hydrooj/hydrojudge"]' > /root/.hydro/addon.json +RUN install -d -o root -g root /root/.hydro /data/file \ + && cat <<'EOF' > /root/.hydro/config.json +{"uri":"mongodb://mongo/hydro"} +EOF + && cat <<'EOF' > /root/.hydro/addon.json +["@hydrooj/ui-default","@hydrooj/hydrojudge"] +EOF.devcontainer/devcontainer.json (2)
21-34: Avoid double-installing Node – the base image already ships with Node 22.Adding the Node dev-container feature forces an extra install layer and lengthens build time.
Unless you need a different version or extra options, drop the feature block to keep the image slim.- "ghcr.io/devcontainers/features/node:1": {}
35-35:postCreateCommandassumes globalyarn; ensure it’s present with Node 22.Recent Node images rely on Corepack and don’t install classic Yarn v1 globally. Either prepend
corepack enableor install Yarn explicitly.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.devcontainer/Dockerfile(1 hunks).devcontainer/devcontainer.json(1 hunks).devcontainer/docker-compose.yml(2 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: build
🔇 Additional comments (3)
.devcontainer/docker-compose.yml (1)
17-18: Verify that replacing Hydro’s default start-up withgo-judgeis intentional.
command: go-judgewill execute the Go binary and not start the Node-based Hydro server (yarn start/node index.js).
If the intention was to add the judge service, consider declaring it as a separate service instead of hijackinghydro..devcontainer/Dockerfile (1)
1-1: Confirm Hydro supports Node 22.The base image jump from v20 → v22 can surface native-addon ABI breaks and engine-range mismatches (
"engines": {"node": ">=14 <=20"}etc.).
Run the test suite oryarn install --check-enginesto ensure compatibility..devcontainer/devcontainer.json (1)
22-26: ValidatebinaryNamesschema forgh-releasefeature.The feature spec expects an array (
["go-judge"]), not a string. An incorrect type silently skips symlinking, leaving the binary inaccessible in$PATH.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.devcontainer/Dockerfile(1 hunks).devcontainer/devcontainer.json(1 hunks).devcontainer/docker-compose.yml(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- .devcontainer/docker-compose.yml
- .devcontainer/devcontainer.json
🧰 Additional context used
🪛 Hadolint (2.12.0)
.devcontainer/Dockerfile
[error] 5-5: unexpected '{'
expecting '#', '', ADD, ARG, CMD, COPY, ENTRYPOINT, ENV, EXPOSE, FROM, HEALTHCHECK, LABEL, MAINTAINER, ONBUILD, RUN, SHELL, STOPSIGNAL, USER, VOLUME, WORKDIR, a pragma, at least one space, or end of input
(DL1000)
⏰ 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). (3)
- GitHub Check: CodeQL
- GitHub Check: build
- GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
.devcontainer/Dockerfile (1)
1-1: Confirm Node 22 compatibilityBumping the base image to
typescript-node:22-bookwormis forward-looking, but Hydro’s runtime and any pinned native dependencies must compile against the Node 22 ABI. Please ensure CI covers this path and nonode-gyprecompilation failures pop up.
gh-releaseto install sandbox and apt packagesSummary by CodeRabbit