DOP 301: Exploring OpenRewrite and the Future of Code Modernization

Episode 301

Show Notes

#301: How many applications are in your organization that need to be kept up to date? More than likely, that number is every application needs to be kept up to date, if for no other reason than to keep your security teams happy. It gets even worse if you have 10s, 100s or even 1000s of applications. How do you make this manageable?

In this episode, we sit down with Jonathan Schneider from Moderne to discuss OpenRewrite, a large-scale software refactoring solution. Jonathan explains how OpenRewrite assists in application modernization, security vulnerability repair, and code quality improvements.

Frequently Asked Questions

What is OpenRewrite?

Jonathan Schneider describes it on DevOps Paradox episode 301 as large-scale automated refactoring. The main uses are application modernisation such as language and framework version upgrades, repairing security vulnerabilities, and fixing the kind of code quality issues a static analyser reports. The defining constraint is scope: anything you need to change not in one place but potentially across many repositories at once.

Why is an abstract syntax tree not enough for automated refactoring?

Jonathan Schneider explains on DevOps Paradox episode 301 that a syntax tree told him a method named info was being called, and could not tell him which logging library the field belonged to, since the signatures looked alike. That gap is why OpenRewrite drives the language compiler itself to resolve symbols, and keeps type information and original formatting in what the project calls a lossless semantic tree.

Why do mass pull requests get rejected?

Jonathan Schneider reports a consistent figure on DevOps Paradox episode 301: pushing changes horizontally from a central team yields around 30 percent merge rates. He attributes it to how such requests feel, comparing them to unsolicited advice from a relative, where good content is beside the point. The fix is inverting it, giving the product team the same automation and letting them press the button.

Who should write migration recipes for a framework?

Jonathan Schneider argues on DevOps Paradox episode 301 that the framework authors should, since they have the most context on why a change was made and already write migration guides. He does not rely on goodwill for this. Large customers of the commercial entities behind major frameworks have put spending at risk to demand it, on the argument that whoever breaks you should fix you.

Should you upgrade dependencies frequently or in batches?

Viktor Farcic argues for frequently on DevOps Paradox episode 301, and disputes that it is more work overall. Updating a single library to the next patch a thousand times beats updating a thousand libraries at once, because when something breaks you know where to look. He describes the alternative as deferring until the cost triples and then concluding the system will never be replaced.

Where does AI fit alongside rule-based refactoring?

Jonathan Schneider points out on DevOps Paradox episode 301 that several major vendors’ code migration assistants are built on OpenRewrite underneath, because change at that scale cannot tolerate hallucination. He sees the two as complementary rather than competing: models accelerate writing new code, which produces more code needing maintenance, and the rule-based engine is what handles the maintenance end.

What is the DevOps Paradox podcast?

DevOps Paradox is a weekly podcast co-hosted by Darin Pope and Viktor Farcic, covering DevOps, platform engineering, and modern software delivery. Episode 301 brings in Jonathan Schneider, creator of OpenRewrite and founder of Moderne, to explain automated refactoring at scale, why syntax trees fall short, and why the hardest part is social rather than technical. Every episode page carries the audio, the video, and a full transcript.

Topics

Share and Download

Guests

Jonathan Schneider

Jonathan Schneider

Jonathan is the visionary who founded OpenRewrite, an open-source auto-refactoring tool, at Netflix and went on to found the Micrometer project as a member of the Spring Team. He was a Senior Software Engineer at Gradle and a Senior Engineering Manager at Pivotal. Jonathan is a Java Champion as well as the author of “SRE with Java Microservices” and a co-author of “Automated Code Remediation: How to Refactor and Secure the Modern Software Supply Chain,” (both from O’Reilly).

Hosts

Viktor Farcic

Viktor Farcic

Viktor Farcic is a member of the Google Developer Experts and Docker Captains groups, and published author.

His big passions are DevOps, Containers, Kubernetes, Microservices, Continuous Integration, Delivery and Deployment (CI/CD) and Test-Driven Development (TDD).

He often speaks at community gatherings and conferences.

He has published DevOps Paradox and Test-Driven Java Development.

His random thoughts and tutorials can be found in his blog The DevOps Toolkit.