In my last blog post, I discussed the challenges of using Git as the version control system (VCS) for source code development. In this post, I discuss how Git’s traditional approach to code commits consumes time and infrastructure, and how NetApp® ONTAP® and NetApp AFF can make commits more efficient.
Git provides pre- and post-commit triggers, or “Git hooks,” to validate developer code commits. These checks are configurable in Git and function in the continuous integration (CI) process to identify and isolate errors in the source code.
While newer and next generation applications have smaller code bases with a modular structure, many enterprise organizations have large, monolithic repositories and legacy code as the mainstay of their core business. Not all legacy applications can be rewritten or broken down into modules as microservices that can run in containers. However, legacy applications and microservices can co-exist in a production environment.
When developers commit code changes to the master or a development branch, some of the changes might not pass the complete list of CI tests. A bisect process in the form of git bisect, p4-bisect, or svn-bisect identifies and isolate errors in the code changes.
The bisect process uses a binary search algorithm to look through the project history and identify the commit that introduced a bug. A bad commit occurs when the bug is present, and a good commit is the last submittal before the bug was introduced in the code.
The bisect process pulls a full copy of the code from the good commit and the bad commit as binary endpoints. Then it verifies and validates the code changes between the commits until the bug is identified. The process is repetitive and sequential, using a lot infrastructure resources and time with very little efficiency.
As organizations move into an operational expenditure (opex) model, the traditional way of using the bisect process is not cost-effective. It doesn’t move an organization closer to its DevOps functional and operational objectives.
NetApp ONTAP data management software can help make source code management more cost effective. Code repositories configured on ONTAP can provide huge value toward reducing resource (compute, network and storage) overhead and accelerating the bisect process.
Scalability with efficiency – The NetApp FlexClone® technology in ONTAP provides sandboxes to set up an instant copy of the good commit from a consistent NetApp Snapshot™ copy. FlexClone also can scale with the number of clones for the bad commits. The following image shows how the bisect process verifies and validates only the incremental changes done in the various versions of code commits, whereas the traditional way works with full copies.
NetApp AFF with solid-state drives (SSDs) and the optimized data management capabilities of ONTAP constitute a system that effectively handles code repository workloads. With this system, the bisect process is faster and more efficient; it can run concurrent jobs in parallel as it isolates the bugs in the bad commits.
For large code bases, the bisect process complements and accelerates the application development workflow with better code quality and faster time to market. Faster time to market (TTM) is essence for any software development process that is transitioning or adopting a DevOps practice.
In my previous blogs I had highlighted how build time can be reduced up to 50% for developers and in the CI process to merge the code changes. Isolating source code errors is also part of the build cycle. NetApp FlexClone technology accelerates the bisect process to rapidly identify bugs in the code submittals.
The story continues in my next blog post, where I describe how developers collaborate globally on source code and binaries to speed the process of distributed development.