Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Although every gem bump should be done carefully and with attention, most of the time it’s just a matter of running the `bundle update` command, look at the CHANGELOG, and maybe fix couple tests failing due to the upgrade. But what about upgrading a gem whom introduced a lot of breaking changes in the new version? The upgrade could cause hundreds if not thousands of your existing tests to fail. In this talk I’d like to share the different techniques and strategies that will allow you to upgrade any dependency smoothy and safely. RubyKaigi 2018 https://rubykaigi.org/2018/presentations/Edouard-chin
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
The presentation by Edouard Chin at RubyKaigi 2018 focuses on the complex process of upgrading Ruby gems, particularly when significant breaking changes are involved. Chin shares insights and strategies developed at Shopify for smooth and safe dependency upgrades, emphasizing that while minor upgrades may be straightforward, major upgrades often entail substantial challenges. **Key Points Discussed:** - **Introduction to the Risk of Upgrading:** - Upgrading gems is a necessary yet risky routine task that can lead to production issues if not managed properly. - Application dependencies, like Rails, can cause widespread test failures during upgrades. - **Gem Upgrade Strategies:** - The presentation categorizes gems into three buckets based on their upgrade complexity: 1. **Easy Upgrades:** Gems that are not widely used, allowing for straightforward reversion if issues arise. 2. **Challenging Upgrades:** Critical gems that affect the entire application, such as Rails, necessitating cautious handling to avoid production disruption. 3. **Infrastructure Gems:** Gems essential for core functionalities that must be upgraded without causing service outages. - **Adapting the CI Process:** - A significant challenge faced by developers at Shopify was handling existing CI failures before implementing new checks during the upgrade process. To address this, tools were created to allow dual-booting of applications between gem versions, making it possible to run tests against both versions. - **Using Markers for Known Failures:** - The use of markers in Minitest allows developers to mark tests that intentionally fail, helping maintain an accurate status of the test suite and keeping developers accountable for fixes. - **Componentization for Organization:** - The project aimed to improve code organization through componentization, enabling accountability and a gamification element where teams strive for zero failures. - **Safe Deployment Practices:** - For deploying new gem versions, Shopify utilized controlled rollouts, starting the deployment in a limited capacity to monitor performance and user experience before a full-scale rollout. - **Proactive Management of Deprecations:** - Chin highlights the importance of managing deprecations before upgrading dependencies. The development of the Deprecation Toolkit at Shopify records deprecation warnings, aiding in the prevention of new deprecated code from slipping into the codebase. **Conclusions:** - The overarching message is that proper planning and proactive management of dependencies can lead to a smoother upgrade process, preventing setbacks and ensuring application stability. - Chin encourages developers to adopt these strategies to mitigate issues during gem upgrades, allowing teams to maintain progressive momentum during their development cycles.
Suggest modifications
Cancel