Loading…
Living on the Edge of Rails
2023-10-18
- Source
- Shopify
- Published
- Added to Yomu
Summary
Shopify describes running its Core monolith on the unreleased Rails 6 master branch, or “Edge of Rails,” since February 2019, with the goal of continuously using the framework’s latest revision. Instead of annual upgrades, weekly changes reduce diff size and let developers use upstream features quickly, while a 130,000-plus-test suite finds edge cases and informs patches to Rails and related projects such as Zeitwerk. Solid Track automates weekly Rails bumps, opens GitHub pull requests, and triggers git bisect when CI fails to identify the breaking commit. Green builds move through ten-minute canary deployments before reaching the remaining servers. The approach trades the stability of released dependencies for faster fixes and features, relying on monitoring, tests, and controlled deployment to manage risk.
Context
Outdated dependencies expose projects to security issues and technical debt, while large Rails upgrades can require substantial time and effort. Shopify wanted faster access to fixes and features without dedicating a team and months of work to periodic upgrades.
Approach / What changed
Shopify runs its Core monolith against the Rails master branch, updates it weekly with the Solid Track bot, tests changes against more than 130,000 tests, uses git bisect to locate failures, and deploys successful changes through ten-minute canary releases before wider rollout.
Takeaways
- Targeting Rails HEAD replaces large annual upgrades with smaller weekly diffs and makes newly merged framework changes available immediately.
- Solid Track opens a weekly GitHub pull request and automatically triggers git bisect when continuous integration reports a failure.
- Using an unreleased dependency carries a stability trade-off; Shopify relies on monitoring, a large test suite, and canary deployments to mitigate production risk.