I believe it is the responsibility of the development team to continually be aware of major new releases of dependencies in their project, such as Ruby, Rails, databases, and core gems the project relies upon - the team should have at minimum a rough plan/schedule in mind to stay current.
An out-of-date code base becomes a daunting and overwhelming task to address, which then typically gets avoided even longer - compounding the problem and risk.
However, I don't usually upgrade to new major releases until they have been released for more than a few months. This allows time for the developers to gather feedback from the broader community, fix bugs, and address any rough edges.
The work required to upgrade a Rails project significantly depends on the specific code base (size and quality). A robust test suite helps get a sense of the extent of work required to complete the upgrade.
A well-maintained large code base can be easier to upgrade than a smaller project lacking a test suite, with sloppy code that has been neglected for years.
If gems haven't been maintained/updated for point releases; I begin there. Updating a gem from 1.2.3 to 1.2.4 is usually a safe update. But I'll review the project's release notes or CHANGELOG.md to be certain.
I start by researching official migration documentation for the specific release, along with some searching for, and reading articles others have written on the subject.
Assuming the project has a robust and passing test suite - I'll make a branch, rails-next
, and start incrementally upgrading dependencies and fixing issues to achieve 100% passing tests. Lastly, I'll start addressing any deprecation warnings.
The application test suite may be passing 100%, and there aren't any obvious issues, but there may still be edge cases or issues that aren't obvious right away.
Finally, I may choose to sit on the rails-next
branch for a few weeks, or months, merging any bug fixes and feature branches, and deploying it to staging. Then our QA/review team is also testing and reviewing the rails-next
branch.
Once we've decided as a team that we're ready to make the switch, we'll merge to the main branch and push to production*.* **But, never on a Friday!**๐