Replacing the Gearbox (while Driving Down the Motorway) by Dan Haywood

Learn how to safely migrate major framework versions while maintaining active development, using techniques like parallel codebases, automated testing, and CI/CD pipelines.

Key takeaways
  • Used Maven profiles and Git worktrees to maintain parallel v1/v2 codebases during a major framework migration while continuing development

  • Leveraged “marker files” to control which profile/version was active, allowing selective migration of modules while keeping the application running

  • Implemented approval testing to validate changes across versions, making it easier to verify compatibility and spot unintended differences

  • Used Open Rewrite recipes to automate migration steps like updating Java versions and dependencies, reducing manual work

  • Maintained parallel CI/CD pipelines to build and deploy both versions simultaneously, allowing gradual transition

  • Kept business stakeholders focused on delivering value while technical migration happened “under the hood”

  • Used Arc Unit for enforcing architectural rules and preventing dependency cycles between modules

  • Implemented distributed tracing with Jaeger to analyze build performance and identify bottlenecks

  • Managed dependencies carefully using Maven lockdown files to track and control changes between versions

  • Broke down the migration into small, manageable chunks that could be validated and rolled back if needed