Empirical Study of Restarted and Flaky Builds on Travis CI

Proceedings of the 17th International Conference on Mining Software Repositories, Main track (MSR'20)

T. DurieuxC. Le GouesM. HiltonR. Abreu 

PDFDOIVideoSource codeExperiment Results

Abstract

Continuous Integration (CI) is a development practice where developers frequently integrate code into a common codebase. After the code is integrated, the CI server runs a test suite and other tools to produce a set of reports (e.g., output of linters and tests). If the result of a CI test run is unexpected, developers have the option to manually restart the build, re-running the same test suite on the same code; this can reveal build flakiness, if the restarted build outcome differs from the original build. In this study, we analyze restarted builds, flaky builds, and their impact on the development workflow. We observe that developers restart at least 1.72% of builds, amounting to 56,522 restarted builds in our Travis CI dataset. We observe that more mature and more complex projects are more likely to include restarted builds. The restarted builds are mostly builds that are initially failing due to a test, network problem, or a Travis CI limitations such as execution timeout. Finally, we observe that restarted builds have a major impact on development workflow. Indeed, in 54.42% of the restarted builds, the developers analyze and restart a build within an hour of the initial failure. This suggests that developers wait for CI results, interrupting their workflow to address the issue. Restarted builds also slow down the merging of pull requests by a factor of three, bringing median merging time from 16h to 48h.

@inproceedings{DBLP:conf/msr/DurieuxGHA20,
author = {Thomas Durieux and
Claire Le Goues and
Michael Hilton and
Rui Abreu},
editor = {Sunghun Kim and
Georgios Gousios and
Sarah Nadi and
Joseph Hejderup},
title = {Empirical Study of Restarted and Flaky Builds on Travis {CI}},
booktitle = {{MSR} '20: 17th International Conference on Mining Software Repositories,
Seoul, Republic of Korea, 29-30 June, 2020},
pages = {254--264},
publisher = {{ACM}},
year = {2020},
url = { https://doi.org/10.1145/3379597.3387460 },
doi = {10.1145/3379597.3387460},
timestamp = {Tue, 13 Apr 2021 13:32:36 +0200},
biburl = { https://dblp.org/rec/conf/msr/DurieuxGHA20.bib },
bibsource = {dblp computer science bibliography,  https://dblp.org }
}
Last Updated: 28/07/2021