Skip to content

Update to ruby 3.4#1715

Open
aaccensi wants to merge 9 commits intomasterfrom
update-ruby3.4
Open

Update to ruby 3.4#1715
aaccensi wants to merge 9 commits intomasterfrom
update-ruby3.4

Conversation

@aaccensi
Copy link
Contributor

@aaccensi aaccensi commented Mar 2, 2026

Context

With the goal to update Ruby/Rails stack apps to Ruby 4 and Rails 8 (etengine, etmodel, etlocal, my-etm).
Now we are making a in-between step to Ruby 3.4 to be able to run respec with deprecation warnings.
Then finally update to Rails 8.1, fix any issues and adopt the Solid Stack where relevant.

Implemented changes

  1. Bumped the internal gems versions to use the newest commits (made Ruby 4 ready in another set of PRs).
  2. Upgrade to Ruby 3.4 and run rspec with deprecation warnings:
    • fixture_path → fixture_paths
    • Update shoulda-matchers gem version
    • Update dry-* gems versions
  3. Upgrade to Rails 8.1 and fix issues:
    • Remove unnecessary requires
    • Change error messages
  4. Delete Action Cable references
  5. Configure Solid Queue
  6. Configure Solid Cache (Replaced Memcached/dalli)
    • Notice that the graph is still stored/retrieved with NastyCache so it lives directly in Ruby process memory

Note that some configuration is necessary, we added dedicated DBs for Solid Queue and Solid Cache, that needs configuring some env vars:

  • CACHE_DATABASE
  • CACHE_DATABASE_URL
  • QUEUE_DATABASE
  • QUEUE_DATABASE_URL

Related

This is one of 5 PRs with the same purpose across the following 4 repos:

Checklist

  • I have tested these changes
  • I have updated documentation as needed
  • I have tagged the relevant people for review

Additionally fixed  some error messages acording to current message in Rails 7.1+ "undefined method 'permit' for.."
@aaccensi aaccensi mentioned this pull request Mar 2, 2026
3 tasks
Fixes include removing two legacy explicit requires and update spec assertions to match changed Rails 8 error messages.
aaccensi added 3 commits March 3, 2026 14:23
Nothing to migrate to Solid Cable since it is entirely unused therefore only cleanup.
Only setting up as there are no jobs at the moment in etengine.
Replaces Memcache(Dalli)
@aaccensi aaccensi mentioned this pull request Mar 4, 2026
3 tasks
@aaccensi aaccensi marked this pull request as ready for review March 11, 2026 15:08
@aaccensi aaccensi requested a review from noracato March 11, 2026 15:08
Copy link
Member

@noracato noracato left a comment

Choose a reason for hiding this comment

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

Looks good! Nice work!!

Two small questions on staging configs, and a question for bundler. But we can leave bundler for Ruby 4.0 as well. What do you think?


development:
<<: *default

Copy link
Member

Choose a reason for hiding this comment

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

Do we need a staging entry here?

threads: 3
processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %>
polling_interval: 0.1

Copy link
Member

Choose a reason for hiding this comment

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

Same here: do we need a staging entry?

Comment on lines +1 to +10
# examples:
# periodic_cleanup:
# class: CleanSoftDeletedRecordsJob
# queue: background
# args: [ 1000, { batch_size: 500 } ]
# schedule: every hour
# periodic_cleanup_with_command:
# command: "SoftDeletedRecord.due.delete_all"
# priority: 2
# schedule: at 5am every day
Copy link
Member

Choose a reason for hiding this comment

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

As a note: we can use this to clean up old mechanical turk scenarios from the db, instead of using cron jobs via ansible. This also makes our data policies more clear to our users.

ruby 3.4.7p58

BUNDLED WITH
2.6.6
Copy link
Member

Choose a reason for hiding this comment

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

Bundle version got downgraded. Bundler 4 just came out. We should use that for Ruby 4.0

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.

2 participants