Project

General

Profile

Actions

Idea #20300

closed

RailsAPI upgrade from 5.2 to 7.0

Added by Lucas Di Pentima over 1 year ago. Updated 7 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Start date:
10/06/2023
Due date:
Story points:
5.0
Release:
Release relationship:
Auto

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.


Subtasks 1 (0 open1 closed)

Task #20866: Review 20300-rails7ResolvedTom Clegg10/06/2023Actions

Related issues

Has duplicate Arvados - Bug #20844: Upgrade API server to Rails 6DuplicateActions
Blocks Arvados - Idea #20846: Support Ubuntu 22.04 LTSResolvedBrett Smith10/30/2023Actions
Blocked by Arvados - Bug #20862: Deal with our google api client fork in the arvados ruby sdkResolvedTom CleggActions
Actions #1

Updated by Peter Amstutz over 1 year ago

  • Release deleted (62)
  • Story points set to 5.0
  • Description updated (diff)
Actions #2

Updated by Peter Amstutz over 1 year ago

  • Target version changed from Future to To be scheduled
Actions #3

Updated by Brett Smith over 1 year ago

  • Has duplicate Bug #20844: Upgrade API server to Rails 6 added
Actions #4

Updated by Brett Smith over 1 year ago

  • Description updated (diff)
Actions #5

Updated by Brett Smith over 1 year ago

Actions #6

Updated by Peter Amstutz over 1 year ago

  • Target version changed from To be scheduled to Development 2023-08-30
Actions #7

Updated by Peter Amstutz over 1 year ago

  • Assigned To set to Tom Clegg
Actions #8

Updated by Tom Clegg about 1 year ago

  • Target version changed from Development 2023-08-30 to Development 2023-09-13 sprint
Actions #9

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
Actions #10

Updated by Tom Clegg about 1 year ago

  • Status changed from New to In Progress
Actions #11

Updated by Peter Amstutz about 1 year ago

  • Target version changed from Development 2023-09-13 sprint to Development 2023-09-27 sprint
Actions #12

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)
Actions #13

Updated by Lucas Di Pentima about 1 year ago

Is that really necessary? Since we're deprecating Workbench1 soon, I mean.

Actions #14

Updated by Tom Clegg about 1 year ago

Indeed. Updating workbench1 to rails 6 is officially off the table.

Actions #15

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
Actions #16

Updated by Peter Amstutz about 1 year ago

  • Target version changed from Development 2023-09-27 sprint to Development 2023-10-11 sprint
Actions #18

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?
Actions #19

Updated by Peter Amstutz about 1 year ago

  • Target version changed from Development 2023-10-11 sprint to Development 2023-10-25 sprint
Actions #20

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.

Actions #21

Updated by Lucas Di Pentima about 1 year ago

This LGTM, thanks.

Actions #23

Updated by Tom Clegg about 1 year ago

  • Status changed from In Progress to Resolved
Actions #24

Updated by Peter Amstutz 7 months ago

  • Release set to 70
Actions

Also available in: Atom PDF