Automated code testing for code deployment pipeline based on risk determination
AssigneeAdobe Inc.
InventorsHarinder Singh Sandhu, Adrian John O'Lenskie
Life of this patent
Estimating the term…
Abstract
Software code is written using a multistage automated code deployment pipeline. A code change is provided to the pipeline and at each stage various checks or evaluations of the code change is performed. Additionally, a risk profile is generated for the code change that identifies a risk of making the code change based on the code change itself as well as a reputation of the individual providing the code change. In one or more stages of the pipeline, a determination is made whether the risk profile meets a verification criteria, and if so the code change does not progress to the next stage in the pipeline until additional verification (in addition to any testing typically performed at that stage) is performed.
Claims20
A method for monitoring code changes in a multistage automated code deployment pipeline, the method comprising:
- generating a repository risk score based on a collection of historical outcomes of code submissions to a code repository and additional data describing the code repository;
- generating a code change risk score based on a history of a code change in the code repository including a ratio of a number of times the code change has failed to a number of times the code change successfully passed a stage in the multistage automated code deployment pipeline, a number of lines of code in the code repository that are changed by the code change, an age of the code change, a number of quality gate failure exceptions given for the code change, and how many code changes a developer of the code change has merged with the code repository;
- generating a developer risk score based on a collection of historical outcomes of code submissions by the developer;
- determining a risk profile for the code change based on the repository risk score, the code change risk score, and the developer risk score;
- determining whether the risk profile meets a verification criteria;
- and
- preventing, in response to determining that the risk profile meets the verification criteria, the code change from progressing to a next stage in the multistage automated code deployment pipeline.
A method for monitoring code changes in a multistage automated code deployment pipeline, the method comprising:
- generating a repository risk score based on a collection of historical outcomes of code submissions to a code repository and additional data describing the code repository;
- generating a code change risk score based on a history of a code change in the code repository;
- generating a developer risk score based on a collection of historical outcomes of code submissions by a developer that submitted the code change, the generating the developer risk score including generating a coverage index value based on standardizing data indicating a number of code changes the developer has merged with the code repository, generating a peer index value based on standardizing data indicating the developer risk for each of one or more peer reviewers of the code change, and summing the coverage index value, the peer index value, and the code change risk score;
- determining a risk profile for the code change based on the repository risk score, the code change risk score, and the developer risk score;
- determining whether the risk profile meets a verification criteria;
- and
- preventing, in response to determining that the risk profile meets the verification criteria, the code change from progressing to a next stage in the multistage automated code deployment pipeline.
A computing device for monitoring code changes in a multistage automated code deployment pipeline, the computing device comprising:
- a processor;
- and
- computer-readable storage media having stored thereon multiple instructions that, responsive to execution by the processor, cause the processor to perform operations including:
- generating a repository risk score based on a collection of historical outcomes of code submissions to a code repository and additional data describing the code repository including a number of files in the code repository that are changed by a code change, a number of lines of code in the code repository that are changed by the code change, a ratio of a number of times the code change has failed to a number of times the code change successfully passed a stage in the multistage automated code deployment pipeline, an age of the code change, a number of quality gate failure exceptions given for the code change, how many code changes a developer of the code change has merged with the code repository, and a number of developers that have contributed code to the code repository;
- generating a code change risk score based on a history of the code change in the code repository;
- generating a developer risk score based on a collection of historical outcomes of code submissions by the developer;
- determining a risk profile for the code change based on the repository risk score, the code change risk score, and the developer risk score;
- determining whether the risk profile meets a verification criteria;
- and allowing the code change to progress to a next stage in the multistage automated code deployment pipeline only in response to receipt of additional verification of the code change.
A system comprising:
- a deployment pipeline monitoring system to monitor a code change in a multistage automated code deployment pipeline, wherein the deployment pipeline monitoring system is to identify a number of lines of code in a code repository that are changed by the code change, a ratio of a number of times the code change has failed to a number of times the code change successfully passed a stage in the multistage automated code deployment pipeline, an age of the code change, a number of quality gate failure exceptions given for the code change, a number of files in the code repository that are changed by the code change, and a number of developers that have contributed code to the code repository;
- means for automatically generating a risk profile for the code change based on a collection of historical outcomes of code submissions to the code repository, a history of the code change in the code repository, a collection of historical outcomes of code submissions by a developer that submitted the code change, how many code changes the developer of the code change has merged with the code repository, the number of lines of code in the code repository that are changed by the code change, the ratio of the number of times the code change has failed to the number of times the code change successfully passed the stage in the multistage automated code deployment pipeline, the age of the code change, the number of quality gate failure exceptions given for the code change, the number of files in the code repository that are changed by the code change, and the number of developers that have contributed code to the code repository;
- and
- a quality control module included in a stage in the multistage automated code deployment pipeline to determine whether the risk profile meets a verification criteria, and preventing, in response to determining that the risk profile meets the verification criteria, the code change from progressing to a next stage in the multistage automated code deployment pipeline.
Dependencies are inferred from the claim text.