Back to search

Queen's University at Kingston

On the Performance and Hermeticity of Artifact-Based Build Technologies

Abstract

dc:description.abstract

An efficient continuous integration (CI) build should automatically run all compilation and test activities, as fast as possible, providing developers with rapid feedback on their submitted code changes. This requires the CI build's underlying build technology not only to achieve high build performance but also to yield the same (reproducible) build results across different builds of the same code change. In recent years, new artifact-based build technologies like Bazel have emerged, providing support for parallel and incremental builds, and enabling reproducible builds through build hermeticity. However, little is known about the extent to which such artifact-based build technologies deliver on their promised benefits. This thesis empirically studies both the major build performance and build hermeticity features of Bazel. The first part of the thesis conducts an empirical study to investigate the usage of the new parallel and incremental build features of Bazel in popular CI services across 383 open-source Bazel projects, then compares the results with 383 large and 383 small Maven projects. We performed 3,500 experiments on a subset of 70 buildable Bazel projects to evaluate the performance impact of Bazel's parallel builds. Additionally, we performed 102,232 experiments on the 70 buildable projects' last 100 commits to evaluate Bazel's incremental build performance. Our findings show Bazel's potential for significantly reducing build duration in CI. However, this potential is not always harnessed by developers, as Bazel's parallel and incremental build may not be adopted correctly or underutilized by developers in CI builds. We found that, as the parallelism degree increases, fewer projects, particularly for short- and medium-build duration projects, can fully exploit the parallelism. Furthermore, we observed that long-build duration projects benefit significantly more from incremental build than the short- and medium-build duration groups. In the second part of the thesis, we evaluated the hermeticity of Bazel builds, which ensures build reproducibility by isolating the build from changes to the host system. We studied the build dependencies of 70 buildable Bazel projects by analyzing 150 million Linux system calls collected during the projects' build processes. We find that none of the studied projects has a completely hermetic build process. As the non-hermetic build dependencies may not be installed by default on new machines and third-party CI environments may update non-hermetic project dependencies at any point in time, we observe that developers' builds risk to fail at any point in such environments. We identified the primary cause of non-hermeticity as the default configuration of key Bazel build rules, which can introduce non-hermetic dependencies into the build process. This research provides guidance for developers to improve their usage of Bazel to increase build performance and hermeticity in their projects, and emphasizes the importance of empirically studying the usage and benefits of modern build systems and their potential advantages within contemporary software practices.

Degree

thesis:*
Department dc:contributor.department
Computing
Grantor
Queen's University at Kingston
Year dc:date.issued
2024

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Zheng, Shenyu
Advisors dc:contributor.supervisor
  • Adams, Bram
  • Hassan, Ahmed

Subjects

dc:subject × 3

Rights

dc:rights
Statement dc:rights
  • Attribution 4.0 International
Language dc:language.iso
eng

Identifiers

dc:identifier.*
Handle dc:identifier.uri
https://hdl.handle.net/1974/33111

Chain of custody

source
Harvested from
Queens University
Base URL
qspace.library.queensu.ca/server/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Zheng, Shenyu. On the Performance and Hermeticity of Artifact-Based Build Technologies. Queen's University at Kingston, 2024. https://hdl.handle.net/1974/33111