Machine Learning Use Cases For DevOps Platform
If your organization is into building DevOps platforms that integrate various parts of the product lifecycle like code check-ins, builds, Continuous Integration (CI), Continuous Deployment (CD), ticketing system, sprint planning, release management, etc.; here are some interesting Machine Learning Use Cases that you can implement on your platform
1. Predicting Build Time
The ML program will collect information about the machine on which a build was run, number of lines of code (#lines) that went into the build, number of files of code (#files) and the time it takes to complete a successful build. The program will train a regression model using these input parameters of build machine, #lines, and #files. Using this trained model the program can now predict the build time for any build in advance. If the actual build takes more than 120% of this predicted build, the program will send an alert since it is very likely that there are some issues with the build
2. Sprint Predictions
Software Development is about engineering rich functionalities to solve complex business requirements along with enhanced product quality. Agile methodologies that cater to the development process iteratively and incrementally are becoming widespread and commonplace. It breaks down the rich complex functionality in small user stories. These user stories are scheduled over small milestones that are called as sprints. Every sprint runs typically for a short duration of two weeks. Once a sprint is planned it is important to track it for any further fine tuning on the go. It is mostly a balancing act between achieving more incremental functionality while keeping the high bar of quality. The richness of functionality relates roughly to the number of user stories planned during a sprint. The quality has multiple measures like a number of open bugs, automation coverage. The sprint typically schedules numerous activities like feature development, test development, bug fixing, bug finding, automation, etc. All these activities, however, have a fixed, limited time of, say two weeks. We will monitor all these parameters throughout the sprint along with parameters affecting them (e.g., number of developers, number of testers, number of automation engineers, number of lines of code added, etc.). Considering all the above-stated parameters, the number of remaining days in the current sprint at any given time will typically dictate how much of the activity of each category can be achieved realistically. Based on these forecasts ML will convey whether the sprint is on track. It will also make recommendations like whether we can pick up anymore or need to drop any existing user stories. It will also guide in conveying whether to focus more on feature development, test development, bug fixing, bug finding or automation, based on say targeted values of bug count, test cases, code coverage percentages, etc., as a part of fine-tuning.
We can either compute these multiple guiding recommendations as a multi-class classifier or as multiple regressions based on all the considered input parameters.
1. Intelligent Ticketing System
For any newly filed ticket we will:
- Categorize the ticket automatically
- Find similar tickets
- Automatically assign the ticket to the right owner and
- Automatically resolve the underlying issue, if possible.
All these activities will be performed by doing Natural Language Processing (NLP) of the content of the tickets and the history.
2. Predicting Release Time
Any release typically has numerous criteria e.g.
- No priority 0 defects
- 80% code coverage
- All user stories completed
- 90% automation achieved
- Not more than 40 total defects etc.
It would be good if one can effectively predict how long it will take to complete the current release at any given time. To achieve this, in addition to above-mentioned parameters we will capture;
- Number of developers on the team
- Number of QA engineers on the team
- #total defects
The program will train a regression model to predict the release time as the output of these input parameters. Using this trained model we can predict the release time at any given time.