Big changes and no tests

Dominik Kapusta

Short talk - in English

Ever feared, that your tiny change to a giant legacy codebase might make it fall apart like a house of cards? What did you do? Reviewed the code 10 times, covered with tests, prepared tons of test data, load-tested, checked production logs every minute? But could you sleep well at night, even after all these precautions?

We’ve been there and we know the pain. Developing one of the largest Atlassian’s cloud products required us to find ways to alleviate the risk of incidents and performance regressions. While refactoring the existing code we simply couldn’t rely solely on our tests. I’d like to share our ideas with you and give some guidelines on incorporating them.

In the solution that I’m going to present the only thing required from a developer is to wrap his code change with a special service. The “code change” could be for example a replacement of old method with its new, refactored version. The service would then ensure smooth rollout of the change by:

  • Alerting if the new method is slower or throws exceptions
  • Enabling a fallback to the old method in case of any problems
  • Ensuring both methods return the same data
  • Providing faster feedback loop.