Fix capistrano configuration and CI - #165
Conversation
📝 WalkthroughWalkthroughUpdates runtime versions (Node → 22.14.0, Ruby → 3.4.7), switches CI tests to ubuntu-24.04 and installs OS libraries, adds Capistrano NVM integration, changes deployment npm invocation to ChangesTooling, CI, Deployment, and Specs
🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels:
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
package.json (1)
21-25: ⚡ Quick winConsider using a version range for Node.js instead of an exact version.
The
engines.nodefield specifies an exact version"22.14.0", which will cause npm/yarn to reject any other Node version (including patch updates like 22.14.1). This can create friction for developers and CI environments that use slightly different versions.Consider using a range like
">=22.14.0 <23.0.0"or"^22.14.0"to allow compatible versions while still enforcing the major version constraint.♻️ Suggested engine constraint
"engines": { - "node": "22.14.0", + "node": ">=22.14.0 <23.0.0", "npm": ">=10.0.0", "yarn": "~1.22.1" }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@package.json` around lines 21 - 25, The engines.node field currently pins an exact Node version ("22.14.0") which is too restrictive; update the package.json engines entry (the "engines" object, key "node") to use a range such as ">=22.14.0 <23.0.0" or a caret range like "^22.14.0" so patch/minor updates are allowed while keeping major constraints; ensure npm/yarn compatibility by choosing the appropriate range and updating any CI/README notes if they reference the exact version.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@config/deploy.rb`:
- Around line 12-14: The nvm_map_bins setting currently includes the Ruby tool
"rake" which is wrong; update the Capistrano config by removing "rake" from the
set :nvm_map_bins declaration (leave only Node-related binaries like "node" and
"npm") so the nvm plugin only maps Node.js bins and does not try to force a Node
environment for Ruby tooling.
---
Nitpick comments:
In `@package.json`:
- Around line 21-25: The engines.node field currently pins an exact Node version
("22.14.0") which is too restrictive; update the package.json engines entry (the
"engines" object, key "node") to use a range such as ">=22.14.0 <23.0.0" or a
caret range like "^22.14.0" so patch/minor updates are allowed while keeping
major constraints; ensure npm/yarn compatibility by choosing the appropriate
range and updating any CI/README notes if they reference the exact version.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f2ee3210-3bf9-4b37-92e3-bf6c3f42f55f
⛔ Files ignored due to path filters (2)
Gemfile.lockis excluded by!**/*.lockpackage-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
.github/workflows/decidim_ci.ymlCapfileGemfileconfig/deploy.rbpackage.json
c712d1b to
426c50c
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/decidim_ci.yml:
- Line 35: The apt-get install command in the CI workflow contains a duplicate
-y flag; update the run step that currently reads the install invocation to
remove the extra "-y" so it uses a single "-y" (i.e., change the run command
string that installs libicu-dev, imagemagick, libvips, libvips-tools by removing
the repeated -y).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a138b099-2cc1-42ad-bd0f-749388d47757
📒 Files selected for processing (4)
.github/workflows/decidim_ci.ymlspec/features/authentication_spec.rbspec/features/homepage_spec.rbspec/features/menu_spec.rb
Summary by CodeRabbit
Chores
Tests