Idea #20300
closedRailsAPI upgrade from 5.2 to 7.0
Description
According to this website, Rails 6.0 will be EOLed in June, so we need to upgrade at least to 6.1
Need to do this to stay on a maintained version of Rails for security fixes.
This is also necessary to support Ubuntu 22.04+, Debian 12+, and RHEL 9+: those distributions have OpenSSL 3.0, which is only supported by Ruby 3.x, which is only supported by Rails 6.
This ticket includes transient dependencies like our google-api-client fork:
Bundler could not find compatible versions for gem "activesupport": In Gemfile: arvados (~> 2.1.5) was resolved to 2.1.5, which depends on arvados-google-api-client (>= 0.7, < 0.8.9) was resolved to 0.8.7.4, which depends on activesupport (>= 3.2, < 5.3) rails (~> 6.0.0) was resolved to 6.0.1.rc1, which depends on activesupport (= 6.0.1.rc1)
Should investigate going up to 7.0 if possible to extend the runway of how long we have to worry about upgrading again.
Should review the Gemfile to see if there are gems that we don't use that don't need to be there.
Related issues
Updated by Peter Amstutz over 1 year ago
- Release deleted (
62) - Story points set to 5.0
- Description updated (diff)
Updated by Peter Amstutz over 1 year ago
- Target version changed from Future to To be scheduled
Updated by Brett Smith over 1 year ago
- Has duplicate Bug #20844: Upgrade API server to Rails 6 added
Updated by Brett Smith over 1 year ago
- Blocks Idea #20846: Support Ubuntu 22.04 LTS added
Updated by Peter Amstutz over 1 year ago
- Target version changed from To be scheduled to Development 2023-08-30
Updated by Tom Clegg about 1 year ago
- Target version changed from Development 2023-08-30 to Development 2023-09-13 sprint
Updated by Tom Clegg about 1 year ago
- Blocked by Bug #20862: Deal with our google api client fork in the arvados ruby sdk added
Updated by Peter Amstutz about 1 year ago
- Target version changed from Development 2023-09-13 sprint to Development 2023-09-27 sprint
Updated by Tom Clegg about 1 year ago
Side quest
When deps.go installs nodejs v12.22.12, it comes with npm 6.14.16. When we run npm (run-tests.sh → install apps/workbench), it says
╭────────────────────────────────────────────────────────────────╮ │ │ │ New major version of npm available! 6.14.16 → 10.0.0 │ │ Changelog: https://github.com/npm/cli/releases/tag/v10.0.0 │ │ Run npm install -g npm to update! │ │ │ ╰────────────────────────────────────────────────────────────────╯https://nodejs.org/en/download/current currently offers
- Latest LTS Version: 18.17.1 (includes npm 9.6.7)
- Latest Current Version: 20.6.1 (includes npm 9.8.1)
Updated by Lucas Di Pentima about 1 year ago
Is that really necessary? Since we're deprecating Workbench1 soon, I mean.
Updated by Tom Clegg about 1 year ago
Indeed. Updating workbench1 to rails 6 is officially off the table.
Updated by Tom Clegg about 1 year ago
- Subject changed from RailsAPI upgrade from 5.2.x to 6.1.x to RailsAPI upgrade from 5.2 to 7.0
Updated by Peter Amstutz about 1 year ago
- Target version changed from Development 2023-09-27 sprint to Development 2023-10-11 sprint
Updated by Tom Clegg about 1 year ago
Updated by Lucas Di Pentima about 1 year ago
Just a couple of questions, otherwise LGTM:
- At 3b40453, there're upgrade changes made to Workbench1, given that wb1 tests passed I guess it was something pending from a previous migration? Just mentioning in case it could cause issues.
- Should the line at
services/api/config/application.rb:68
be deleted as 6d918ec applies Rails 7 config defaults?
Updated by Peter Amstutz about 1 year ago
- Target version changed from Development 2023-10-11 sprint to Development 2023-10-25 sprint
Updated by Tom Clegg about 1 year ago
20300-rails7 @ 17d60c7ce9d7a358ab59c43d5c8d3afe506e5dad -- developer-run-tests: #3866
20300-rails7 @ 17d60c7ce9d7a358ab59c43d5c8d3afe506e5dad -- developer-run-tests: #3869
At 3b40453, there're upgrade changes made to Workbench1
This just changes all of the update_attributes() to update(). update_attributes() became an alias for update() in Rails 4. Deprecation warnings only show up in Rails 6, so this isn't strictly necessary, but I think it's safe enough that it's not worth reverting.
Should the line at
services/api/config/application.rb:68
be deleted as 6d918ec applies Rails 7 config defaults?
Yes, fixed, thanks.
I also added a86a6544f54720c5941a32187235ef5287caee07 to add/restore a small bit of coverage in source:lib/controller/rpc tests. Previously the test suite only tested rpc→railsapi; now it has one rpc→controller test as well.
Updated by Tom Clegg about 1 year ago
merged main:
20300-rails7 @ 2508b089d2369bf57811f9f96c14c2ee22dd664f -- developer-run-tests: #3870
Updated by Tom Clegg about 1 year ago
- Status changed from In Progress to Resolved