Skip to content

Ruby 3.1.7 for deployment - #40

Open
steveyken wants to merge 2 commits into
masterfrom
ruby-upgrade
Open

Ruby 3.1.7 for deployment#40
steveyken wants to merge 2 commits into
masterfrom
ruby-upgrade

Conversation

@steveyken

@steveyken steveyken commented May 5, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Updated Ruby version to 3.1.7
    • Updated CircleCI configuration with new Docker image and streamlined deployment workflow

@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@steveyken has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 28 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a6879b0c-d5f3-41a5-9a5d-fa8155c9b850

📥 Commits

Reviewing files that changed from the base of the PR and between 077c066 and f4c7150.

📒 Files selected for processing (1)
  • config/deploy/preview.rb
📝 Walkthrough

Walkthrough

Updated Ruby version from 2.7.3 to 3.1.7 across the project. Modified CircleCI configuration to use a Ruby+Node Docker image matching the new version and removed an unused Azure ACR build job from the workflow.

Changes

Ruby Version Upgrade & CI Simplification

Layer / File(s) Summary
Version Pinning
.ruby-version
Ruby version bumped from 2.7.3 to 3.1.7.
CI Docker Image & Executor
.circleci/config.yml (lines 7–9)
Default Docker image in &defaults alias updated from cimg/node:22.17 to cimg/ruby:3.1.7-node to match the new Ruby version.
Build Job Removal
.circleci/config.yml (lines 48–50)
build-and-deploy-docker-image job (Azure ACR build) removed from job definitions.
Workflow Orchestration
.circleci/config.yml (lines 59–71)
Workflow now runs only checkout_codepackage_dependenciesdeployment with branch filter preserved; removed job is no longer invoked.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐰 Ruby hops from two to three,
Node and ruby dance in harmony,
Azure job bids its farewell with glee,
Simpler pipelines for all to see! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Ruby 3.1.7 for deployment' directly and specifically summarizes the main changes: upgrading Ruby from 2.7.3 to 3.1.7 and updating the CircleCI Docker image to use Ruby 3.1.7.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ruby-upgrade

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.circleci/config.yml (2)

49-57: ⚡ Quick win

Bundle cache is never restored before install.

The deployment job defines *restore-bundle-cache as an alias and saves the cache after install, but never calls restore_cache: *restore-bundle-cache before the bundle check on line 54. This means every deployment run performs a full bundle install from scratch. Note: this is a pre-existing issue, not introduced by this PR, but worth addressing since the cache infrastructure is already wired up.

♻️ Proposed fix
   deployment:
     <<: *defaults
     steps:
       - restore_cache: *restore-repo-cache
       - restore_cache: *restore-yarn-cache
+      - restore_cache: *restore-bundle-cache
       - run: bundle check --path=vendor/bundle || bundle install --deployment --jobs=4 --retry=3
       - save_cache: *save-bundle-cache
🤖 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 @.circleci/config.yml around lines 49 - 57, The deployment job never restores
the Ruby gems cache before running "bundle check --path=vendor/bundle || bundle
install...", so add a restore_cache step that uses the existing
restore-bundle-cache alias (the same cache used by save-bundle-cache) and place
it immediately before the bundle check/run step in the deployment job; ensure
the step uses "restore_cache: *restore-bundle-cache" so the bundle install can
reuse the cached vendor/bundle.

3-5: ⚡ Quick win

Remove unused azure-cli orb.

The build-and-deploy-docker-image job that consumed this orb was removed, so the orb declaration is now dead. Unused orb imports add unnecessary CI resolution overhead and create a fragile dependency on that orb's availability.

♻️ Proposed fix
 orbs:
-  azure-cli: circleci/azure-cli@1.2.0
-
🤖 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 @.circleci/config.yml around lines 3 - 5, Remove the unused azure-cli orb
declaration by deleting the line "azure-cli: circleci/azure-cli@1.2.0" from the
orbs block (and remove the entire orbs block if it becomes empty); also search
for any remaining references to the azure-cli orb or the removed job name
build-and-deploy-docker-image and delete or update those usages to avoid CI
resolution errors.
🤖 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 @.ruby-version:
- Line 1: Replace the EOL ruby-3.1.7 in .ruby-version with a supported branch
(e.g., ruby-3.3 or ruby-3.2 using the latest patch) and ensure consistency
across the repo by updating any other ruby-version declarations (Gemfile's ruby
directive, CI matrix entries, Dockerfiles, or .tool-versions if present). After
changing .ruby-version, run bundle install / bundle lock, rebuild any Ruby-based
containers, and run the test suite to catch compatibility issues; if tests fail,
adjust gem versions or code for the chosen Ruby minor release.

---

Nitpick comments:
In @.circleci/config.yml:
- Around line 49-57: The deployment job never restores the Ruby gems cache
before running "bundle check --path=vendor/bundle || bundle install...", so add
a restore_cache step that uses the existing restore-bundle-cache alias (the same
cache used by save-bundle-cache) and place it immediately before the bundle
check/run step in the deployment job; ensure the step uses "restore_cache:
*restore-bundle-cache" so the bundle install can reuse the cached vendor/bundle.
- Around line 3-5: Remove the unused azure-cli orb declaration by deleting the
line "azure-cli: circleci/azure-cli@1.2.0" from the orbs block (and remove the
entire orbs block if it becomes empty); also search for any remaining references
to the azure-cli orb or the removed job name build-and-deploy-docker-image and
delete or update those usages to avoid CI resolution errors.
🪄 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: 748988c7-2769-4eab-bace-31c730b50913

📥 Commits

Reviewing files that changed from the base of the PR and between 9990178 and 077c066.

⛔ Files ignored due to path filters (1)
  • Gemfile.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .circleci/config.yml
  • .ruby-version

Comment thread .ruby-version
@@ -1 +1 @@
ruby-2.7.3
ruby-3.1.7

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Ruby 3.1.x is now EOL — consider targeting a supported branch.

Ruby 3.1.7 is the final release of the Ruby 3.1 series; no further updates, including security fixes, will be provided for the 3.1 branch. While upgrading from 2.7.3 is an improvement, landing on an already-EOL version means any future CVE will go unpatched. Consider bumping directly to Ruby 3.2 or 3.3, both of which still receive security updates.

🤖 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 @.ruby-version at line 1, Replace the EOL ruby-3.1.7 in .ruby-version with a
supported branch (e.g., ruby-3.3 or ruby-3.2 using the latest patch) and ensure
consistency across the repo by updating any other ruby-version declarations
(Gemfile's ruby directive, CI matrix entries, Dockerfiles, or .tool-versions if
present). After changing .ruby-version, run bundle install / bundle lock,
rebuild any Ruby-based containers, and run the test suite to catch compatibility
issues; if tests fail, adjust gem versions or code for the chosen Ruby minor
release.

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