I have a rather large project (44K lines of code, 800+GB of data, multiple 3rd-party gems) on Heroku that I need to move to newer Ruby/Rails versions due to sunsetting. The question is how best to accomplish this in the limited time available, while upgrading to the most recent version that makes sense). I’m not sure that I even know all the questions to ask, but here are some of them:
1) Is it best to make one big jump to the target version, or better to make incremental jumps to intermediate versions along the way? If the latter, how do I determine the appropriate intermediate versions to use?
2) The project was started with TDD, but TDD was abandoned as testing difficulties accumulated and deadlines loomed (e.g. how to fixturize lots of HTML data that was the basis for 50% of the processing, while data analysis comprised the other 50%). Obviously it would be easier to migrate with TDD, but is it worth the work to add it at this point?
3) I’m guessing there’s not an easy way to make the decision between using newer versions of current gems vs. selecting new gems that might be easier to integrate and/or better suited for our use, right?
Any advice offered on any facet of this project is welcome, as this is the first time that I’ve undertaken such a major upgrade. Also, references to documents covering this subject are also appreciated!
Basic app structure:
1) Website with pages for signup, user configuration, and data chart generation.
2) Sidekiq-driven background processing for lengthy and scheduled tasks (using Pro version for Reliable Queuing).
Current Ruby/Rails versions: MRI 2.0.0 / 3.2.21
Target versions: I’m targeting the Heroku-18 stack. What are the best target versions (looks like the minimum for Heroku Cedar-18 is MRI 2.5.7, but I don’t know what the minimum is for Rails)
Following gems are the major pieces that we depend on:
PG (Postgres database, we use a lot of custom PG SQL)
Sidekiq + Sidekiq Pro (2.13.1 / 1.2.2)
Redis
TheRubyRacer
LogRage
Stripe
Mechanize & Nokogiri
Roo and Spreadsheet
RubyZip
scbi_multi_gz_reader
bcrypt-ruby
will_paginate
geoip
retina-tag
ZenDesk (+ JWT)
UserAgent
Of course, if I can provide more information to help give accurate suggestions, don’t hesitate to ask.
Thanks!