Upgrading GitHub from Rails 3.2 to 5.2
This post details the year-and-a-half long process of upgrading GitHub from Rails 3.2 to 5.2.1. It describes the dual-booting strategy using `Gemfile.lock` and `Gemfile_next.lock` to allow for incremental deployment of new Rails versions. The rollout process involved testing, phased production deploys, and monitoring exceptions and performance. Key lessons learned include upgrading early and often, keeping upgrade infrastructure in place, upstreaming tooling, avoiding private framework APIs, addressing technical debt, performing incremental upgrades, maintaining momentum, and expecting breakage. The post also highlights the benefits of the upgrade, such as addressing technical debt, removing StateMachine in favor of Active Record enums, and replacing the job runner with Active Job.