It is important to have a way to test the exact configuration that runs premerge after each commit to main to ensure that the pipeline is green on main. This is especially important after we migrate to Github actions which we plan to do in the next couple weeks where each PR is tested against the latest main at the time of pushing to the PR. If main is broken, this manifests in tests for PRs also being broken. Currently postcommit testing for the premerge configuration is handled through buildbot with the premerge-monolithic-linux and premerge-monolithic-windows buildbots. In previous discussions (like our US dev meeting talk), we have proposed that we move to testing this configuration within Github actions itself. Recently some have suggested this be done as a proper RFC to better outline the design and motivation and to encourage further discussion.
Summary
Currently a buildbot runs postcommit to check if main is broken against the same configuration run in premerge. We would like to move over to running these postcommit checks through Github for a variety of reasons rather than through Buildbot and have written this proposal outlining our motivations and addressing concerns that have been brought up.
Motivation
- Increased fidelity - One of the major problems with the existing infrastructure being split between Buildkite and Buildbot has been errors that only manifest on one of the systems. This has caused quite a bit of pain, especially when all premerge checks are broken despite the postcommit bot being green. This could be partially remedied by using the same script for both rather than just a CMake factory on the Buildbot side as is done currently, but there still can be questions of fidelity between the systems depending upon how they are set up. Minor configuration changes can have big consequences. Doing everything within Github on the new premerge side eliminates this problem. We use the same exact pipeline and just add another event that triggers the workflow (a one line change), ensuring the steps that are run and the configurations that are built/tested are exactly the same. They also cannot fall out of sync since they come from the same definition.
- Autoscaling - Using Github lets us use the existing autoscaling infrastructure that we have set up to autoscale runners for postcommit testing. This allows commits in main to be tested quickly, especially when they come in a burst, which can be important to diagnose premerge checks that are broken at HEAD, especially given the commit velocity that LLVM has. Using Buildbot would require us to dedicate specific machines, with no easy to use solution to autoscale buildbot workers. This would take away resources from being used to test PRs and also would prevent savings when they get autoscaled down that ultimately get used for more peak capacity/faster machines.
- Less Maintenance - Currently postcommit testing with Github requires a one line change. Doing postcommit testing through Buildbot would represent a significant investment in development time that would detract from other efforts around premerge. Ensuring configurations stay in sync can be made relatively easy with proper engineering, but ultimately still requires some maintenance.
Concerns
- This is a deviation from how LLVM traditionally does postcommit testing - Yes, this does diverge from how LLVM traditionally does postcommit testing and requires people to interact with yet another system. I think the benefits outweigh the drawbacks though, especially given most people should already be familiar with most of the Github Actions UI given it is what we are moving to for premerge.
- Github UI concerns - Github does seem to have some UI limitations, particularly around emails that get sent around job failures. There is little that we can do here, but failure emails do clearly link to the workflow status page which contains most relevant information. The job summaries that get displayed on this page can also be customized as they are standard markdown that gets written by the test jobs themselves. Some pages are less discoverable, like a page showing the status of the most recent commits to main, but they are present.
- Job naming concerns - It was pointed out that the job naming can be confusing given the jobs are titled “Premerge checks” even when running against main. We have a PR up to adjust this.
- Differences in alerting behavior from Buildbot - It was also pointed out that the alerting behavior differs from Buildbot where someone will still receive an email for a failed job even if main is already broken. While we do not have concrete plans, we have been discussing creating a system to not fail jobs based on test/build failures that are already happening in main. Although our hope is that proposals like https://discourse.llvm.org/t/rfc-add-a-warning-when-bypassing-the-premerge-testing/77610 will help alleviate this problem. If we are looking at launching before having any remediation in place (either a low failure rate in main or the ability to ignore previous failures), we will mark the job as succeeding on main regardless of failures to avoid increasing noise. This allows for manual inspection of jobs to see where things are broken while not adding any additional noise as we want to avoid contributing to warning fatigue.