Do you have any files on your computer called something like DocFinalFinalFinal1_2.pdf? If you do, then you probably already understand the basic value of version control.
By saving each version as a new “final” version, rather than overwriting the previous final version, you can not only distinguish between different versions of the same document, but ensure that previous versions aren’t lost forever.
Of course, this isn’t a viable way of working when it comes to sharing files or collaborating with others. And it certainly isn’t an option for writing, editing or sharing code in any kind of project, let alone a sizeable application with many contributors.
So, what kinds of systems are out there to help us work together with our team and not lose our minds along the way? And what specifically is the value of maintaining an organized version history? Read on!
— OverOps (@overopshq) August 10, 2018
The Fundamentals of a Version Control System (VCS)
The systems that teams use to track changes and different code versions are called Version Control Systems (VCS). Just like with anything else, each VCS has its own unique features and comes with its own set of advantages and disadvantages. There are some basics, though, that make a VCS what it is.
First and foremost, they should retain a long-term history of changes made on a project including creation, deletion, edits and more. This should include the author, date and any notes from the changes as well.
Beyond that, they should have a solution for branching and merging new code changes to the main project to allow concurrent work from multiple members of a team. That is the point, after all. The main codebase for a project is called the Trunk or, simply, Main. Branches are created as independent streams of work that can be merged to the Main.
All of this supports traceability in projects. In the event that something goes wrong, it’s easier to look back at the changes made over time and connect them to bugs and errors when they appear. Which brings us to the next question, why is version control so important?
3 Reasons Why VCS is Critical for DevOps
1. Avoiding dependency issues in modern containerized applications
Microservices have essentially become the default for the development of new applications, and more and more teams are containerizing monolithic applications as well. With this trend, dependency issues have entered center stage as something that can make or break a project.
In any kind of project, whether containerized or not, dependency has always been a big concern. Dependency hell, affectionately called JAR hell in Java, is common in applications across multiple languages and has been since early programming days. Eventually, the linear path of building new features and fixing bugs is bound to clash with the parallel development of another feature by another team or hotfixes or a number of other things.
For DevOps, finding the balance between moving quickly and maintaining application reliability is crucial. Part of that means cultivating traceability, gaining visibility into the changes made to the code and understanding how those changes affected application performance. Access to the different code iterations can reveal where new changes exposed dependencies that clash with other parts of the code.
2. Version control is tied to higher DevOps performance
The annual State of DevOps study found, in 2014, that “version control was consistently one of the highest predictors of performance.” Top performing engineering teams were able to achieve higher throughput – 8x deployment frequency and 8000x faster deployment lead times.
Since these original findings in 2014, version control hasn’t lost its significance relative to performance. Last year, it was again tied to success in Continuous Delivery workflows, which in turn contribute to higher IT performance.
What’s causing the high correlation between version control and high performance? Well, it’s partially related to the ability to more easily view and understand how changes to one part of the code caused problem across the application. But, it has more to do with how the VCS enables coding practices like Continuous Integration and, as a result, Continuous Delivery/Deployment.
3. Supports building more reliable applications
The same study from 2014 found that applications built with comprehensive version control systems were more reliable. They experienced 50% lower change failure rates and 12x faster MTTR (issue resolution time).
It’s not hard to draw the connections between high performing DevOps teams and reliable applications. DevOps’ role in any organization is to enable successful advancements, and because change is often the source of failures, there’s a big focus on mitigating the risk of change.
Although it may seem counterintuitive at first, the first step is usually making smaller changes more frequently (hence the popularity of CI). Just as important, and even more so in an accelerated workflow, is tracking those changes so that everyone is looking at the same thing and so that troubleshooting is easier in the case of failures.
Systems Built for Version Control
The first version (pun intended) of a version control system was the Concurrent Versions System (CVS). It was created to support cooperation between a small team of developers with conflicting schedules. After proving useful on the project, the creator released the code to the public in 1986.
Apache Subversion (commonly abbreviated, SVN)
Subversion was created in the early 2000s by CollabNet to address bugs and add some missing features to the original CVS tracking system. Since then, it was adopted into the Apache Incubator and became a top-project for them.
Like its predecessor, Subversion is a centralized VCS meaning there is a single, centralized copy of every project and code changes are committed to this centralized copy. One of the biggest downsides to this is that it prevents users from committing code changes while offline.
The most popular version control system today is Git. It’s what is called a distributed VCS which means that there is no single, centralized code base. Rather, different branches are responsible for hosting different pieces of code. This helps developers and engineers work with the code in local and/or offline environments.
In this space, we have popular tools like:
Check out this post to learn more about these tools and which might be best for your workflow.
Plus, Some Honorable Mentions:
- Helix VCS
Version control is such a basic concept that many people do it naturally with their own personal files. But it’s importance, especially for DevOps, can’t be overlooked. It’s directly correlated to IT performance, which has a clear impact on company revenue and success.
By promoting team collaboration and enabling retroactive examinations of the codebase, version control systems help with the creation of more reliable code and with the maintenance of the code.
Read more about popular version control systems GitHub and BitBucket, and find out which one is best for you.