Die, Long-lived Branches

Jul 16, 2019 by Armory

Long-lived feature branches. We tend to think of them as a relic of the software development practices of yesteryear, but many businesses still have them today. Firstly, while nearly every company preaches the importance of Agile and DevOps, there are plenty of large enterprises still using waterfall-style development and delivery methods for at least a part of their application development.

Secondly, and perhaps more insidiously, there are plenty of teams that call themselves “DevOps” yet still have long-lived feature branches. These branches happen because someone wants a new feature but doesn’t want it to interfere with development on the master branch. Or, because that is how feature development has always been done and inertia is a powerful organizational force. Instead of regularly integrating the code for the new feature with the master branch, the feature branch is kept separate until it is ready for deployment.

Except it’s not really ready to deploy, because it hasn’t been integrated into the rest of the application. And that is the hard part.

Why You Should Avoid Long-Lived Branches

Long-lived branches impair collaboration. Software development, especially in a business setting, is a team effort. If your colleagues can’t see what you’re working on (and if it’s in a feature branch, they can’t see it), they will have no visibility into how your work might affect their work. If everyone is working on long-lived branches and no one can see what anyone else does, bringing it all together can be slow and messy.

Integration problems slow you down. If your organizational goal is to deploy more frequently and to get new features to end users as quickly as possible, integration needs to be done continuously or, at the very least, with branches that are exceptionally short-lived. This reduces the complexity of the integration story and the likelihood that the new code will cause unpredictable problems.

Long-lived branches make continuous delivery impossible. A mature continuous delivery and deployment system involves a fully automated pipeline that is capable of thousands of deployments per day, with no manual intervention. If your feature branches are not being integrated into the master branch until the last minute, you’ll create a huge bottleneck in the pipeline that no amount of tooling will solve.

How to Kill Long-Lived Branches

Moving toward continuous integration is both a technical and cultural process. There are two basic steps in moving toward continuous integration that continuous delivery depends on.

Create company-wide guidelines on branching. Changing your company policy and accepted workflow is ultimately the first step toward avoiding long-lived branches—they are caused not by technical challenges but because development teams were sold on the fact that it was the best way to manage feature development.

Use a continuous integration tool. Once you establish that long-lived branches are not an acceptable development method, get a tool to automate testing of each pull request before it’s merged with the master branch.

There’s a reason it’s called a CI/CD pipeline. Without meaningful continuous integration that’s supported both with appropriate tools and by the development culture at the organization, true continuous delivery and deployment is impossible. Without CI/CD, it’s impossible to meet the core objective of DevOps: getting better software into the hands of end users faster.

Ready to learn more about how Spinnaker can help you move toward a mature CI/CD process? Schedule a time to talk with an Armory expert today.

Share this post:

Recently Published Posts

Navigating AWS Deployment Targets with Armory

Jan 20, 2023

Many organizations look to Amazon Web Services (AWS) to host and deploy their applications in the cloud. However, they’re finding that their deployment tooling, often built as an extension of their legacy continuous integration (CI), is one of the main impediments to adopting cloud services.  Custom-scripted production pipelines built with in-house tooling need to be […]

Read more

Release Roundup – January 2023

Jan 11, 2023

Get the latest product news on Continuous Deployment-as-a-Service and the most recent release for Continuous Deployment Self Hosted, 2.28.2. Welcome to 2023!  Just like every organization, Armory is looking for ways to improve our practices and deliver more value (and faster!) to you, our customers. That’s why our engineering team is working to deliver features, […]

Read more

Learn Continuous Deployment with Armory and Wilco

Jan 6, 2023

Armory is excited to announce we have launched an interactive, narrative-driven developer experience that teaches continuous deployment concepts. And now you can try it out for yourself! Wilco, also known as the “flight simulator” for software developers, allows companies to create engaging interactive developer challenges (called quests) that enable developers to acquire and practice skills […]

Read more