Rails 3 to Rails 7 Upgrade Plan (Revised) v2
Rails 3 to Rails 7 Upgrade Plan (Revised)
Background
Client has a Rails 3.2.22 application running in production since 2013. The app serves approximately 40 users in a regional insurance office. It runs on a single Heroku dyno. Nobody has touched it since Gary left in 2017.
Gary did not leave documentation. Gary has been located. Gary does not remember the app.
Current State
- Ruby 1.9.3 (EOL: February 2015)
- Rails 3.2.22 (EOL: June 2016)
- 847 gems in Gemfile.lock, 211 of which no longer exist on RubyGems
- Asset pipeline uses Sprockets with CoffeeScript and Sass
- Tests: 3. One passes. One is pending. One tests a feature that was removed in 2015.
- Deployment:
git push heroku masterwith no CI - Database: PostgreSQL 9.2 (EOL: November 2017)
- The app stores passwords in MD5. This is not fine.
- A nightly job sends data to a company in Ohio that nobody knew about
Decisions Made
- Rewrite, not upgrade. The incremental path is not feasible. See post-mortem for why.
- Keep the MysteryWorker. The company in Ohio depends on it. We will rebuild the integration properly in the new app.
- Contact Ohio. They have documentation for the data format. Gary did not. Ohio is more organized than Gary.
- MD5 passwords. Force password reset for all users on launch day. No migration path for MD5. We told the client. The client said "Gary said MD5 was fine." We said Gary was wrong. The client seemed unsurprised.
Revised Timeline
| Sprint | Goal | Duration |
|---|---|---|
| 1 | Discovery and environment setup (complete) | 3 weeks |
| 2 | New Rails 7 app, core models, authentication | 2 weeks |
| 3 | UI rebuild, data migration scripts | 2 weeks |
| 4 | Ohio integration rebuild, MysteryWorker replacement | 2 weeks |
| 5 | Testing, security audit, deployment | 1 week |
| Total | 10 weeks |
Original estimate was 4-6 weeks. Revised estimate is 10 weeks. This is because of Ohio.
See also: gem audit for dependency analysis.