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

Lambda Deployment is now supported by Armory CD-as-a-Service

Nov 28, 2023

Armory simplifies serverless deployment: Armory Continuous Deployment-as-a-Service extends its robust deployment capabilities to AWS Lambda.

Read more

New Feature: Trigger Nodes and Source Context

Sep 29, 2023

The Power of Graphs for Ingesting and Acting on Complex Orchestration Logic We’ve been having deep conversations with customers and peer thought leaders about the challenges presented by executing multi-environment continuous deployment, and have developed an appreciation for the power of using visual tools such as directed acyclic graphs (DAG) to understand and share the […]

Read more

Continuous Deployments meet Continuous Communication

Sep 7, 2023

Automation and the SDLC Automating the software development life cycle has been one of the highest priorities for teams since development became a profession. We know that automation can cut down on burnout and increase efficiency, giving back time to ourselves and our teams to dig in and bust out innovative ideas. If it’s not […]

Read more