Why we don't upgrade to the latest version by default.

Every upgrade is a trade-off between staying current and keeping things stable. This post covers how we make that call at November Five, and what we learned when one React Native upgrade turned into several.

Four people on a concrete pier haul in a rope that pulls a long line of small rowing boats, tied one to the next, toward a modernist boathouse, with a man in a red suit at the front.

In short

  • Don’t default to the latest version. Wait for the first patch release, or give it 1 to 2 weeks.
  • Know your why. Security, a feature you need, or end of support. If you can’t explain it, it’s not the right time.
  • Check what an upgrade pulls along before you start.
  • Automate the notifications, not the merges.
  • Don’t be afraid to roll back, and keep upgrades easy to revert.

How one upgrade turned into several

Last year we upgraded React Native in one of our apps by two minor versions. It looked like a contained piece of work. Looking back, a big part of the reason we did it was simply that a newer version was available.

The first build after the upgrade failed. Some of Expo’s internal modules were still on an older version, so their code no longer matched what the new setup expected. Upgrading Expo to a newer patch version fixed the build.

Then the app crashed on launch on iOS. This time our animation library wasn’t compatible with the new React Native version yet, which was a known issue at the time. Upgrading that library fixed the crash.

Each fix was small on its own. Together they took a lot more time than we had planned, and along the way more libraries needed upgrading too. The release that was supposed to include the upgrade got delayed.

That’s when a colleague asked us a simple question: do we actually need the latest version? We didn’t have a good answer. We had upgraded mostly because a new version was out, and that turned out to be a weak reason to take on that much work and risk.

Falling behind hurts too

Waiting longer with upgrades has its own risks though. When a product runs on a runtime that no longer gets security fixes, a critical vulnerability leaves you with nothing to patch. In that situation, taking the product offline can become the only safe option.

If you upgrade too early, you risk shipping regressions. If you wait too long, you can end up without a way to patch at all. So we needed something in between, with clear rules for when an upgrade makes sense.

How we decide when to upgrade

After that upgrade, we wrote these rules down as a play, so other teams could use them too.

Don’t default to the cutting edge. We don’t upgrade just because a new version is out. We wait for the first patch release, or give the community 1 to 2 weeks to find the big issues. Chasing the latest version almost never makes your app more stable.

Waiting also matters for security. Supply chain attacks, where attackers publish a compromised version of a popular package, have become a lot more common. Those versions are usually detected and pulled within hours or days, so the people who install them right away are the ones who get hit. Every device at November Five also runs a security agent that blocks known malicious packages and holds back versions that were only just published.

Know your why. Upgrade for concrete reasons: a security issue, a feature you need, or end of support. Read the changelog and migration guide before you touch a major or core dependency. If you can’t explain why you’re upgrading, it’s probably not the right time.

Sometimes the reason comes from outside. This year Google required a new Play Billing library for any Android update after November 1. Because we knew exactly what was changing and why, we could write a focused test plan, with extra attention for every purchase flow.

Check what comes along. Major upgrades often require other upgrades. Check compatibility with your other dependencies before you start, and plan for the extra work. For React Native, the official upgrade guide and the Upgrade Helper show which files and dependencies change between versions. The release notes of libraries like Expo and Reanimated tell you which of their versions go together with it.

Plan upgrades as their own work. An upgrade that slips into a feature release is harder to test, and harder to trace when something breaks. Give it its own ticket, its own test plan and its own time in the sprint.

Don’t be afraid to roll back. Stability comes first, so if an upgrade causes problems, reverting is a perfectly fine option. Keeping the upgrade in its own branch or PR makes that easy, because you can drop it without losing other work.

The day-to-day part

Most upgrades are small, everyday ones. They mostly become a problem when nobody has looked at them for months. These habits help us keep up.

Automate notifications, not upgrades. For security upgrades, our security scanner flags vulnerable dependencies and opens a pull request with the upgrade that fixes the issue. That gives us a clear reason to upgrade and saves us the busywork. We still review and test those PRs like any other change, since a green pipeline only tells you that the things you test still work.

Make time for it. You don’t have to plan upgrades into every sprint. As an engineer, it’s mostly about being vocal: when you notice something needs upgrading, tell your team and your PO, and make sure time gets reserved for it. If nobody raises it, small upgrades keep getting postponed until they add up to a migration.

Pin everything. We pin all dependencies to exact versions and keep lock files in source control. That way every install gives the same result, on every machine and in CI, and nothing changes unless someone decides to upgrade. It also makes debugging and rolling back more predictable, because you always know exactly which version you’re running.

Takeaway

Nothing broke in production during that upgrade, but it cost us more time than planned and delayed a release. Most of that came from starting without a clear reason, and without checking what else would need to move along.

Many of us already worked this way, but writing it down as a play makes it easier to point to and to agree on as a team. Wait for a new version to settle, check what it pulls along, and plan the work before you start.

The habit that helps us most is writing down why we’re upgrading and which flows it touches, before we start. That makes the upgrade easier to plan and test, and easier to roll back if it goes wrong.