Skip to content

Always clone repos

Rohit Kothur requested to merge rkothur/fix-stale-repos into master

Background

Currently, the CI runner script is set up to default to pre-cloned repositories if the respective *_SOURCE_ROOT variable isn't passed in. For example, if BUILDBOX_WORKER_SOURCE_ROOT isn't specified, it defaults to $BUILDBOX_E2E_ROOT/buildbox-worker, which is created by the previous successful build of the CI. Each buildbox project integrates with the CI by passing the respective *_SOURCE_ROOT variable in to use the current branch's version of the project rather than the $BUILDBOX_E2E_ROOT version.

I recently pushed a change to buildbox-common that broke the interface for the buildbox runners by removing the --verbose option. As a result, the end-to-end test began failing in the master branch of this repository because the worker was trying to pass --verbose to its runner, which was expected. What was unexpected, however, was that the CI also failed in the end-to-end test of the branch in which I fixed this. This happened because the master branch here is what publishes the new end-to-end image, and because it was broken, the end-to-end test in buildbox-worker was still using the old buildbox-common source repo.

Fix

This MR removes the $BUILDBOX_E2E_ROOT directory to force the end-to-end test to clone the master branch of every repository that hasn't been specified with a *_SOURCE_ROOT variable. In doing this, we make sure that we're using the most up-to-date versions of each repository both here and in the various dependent projects that integrate with the CI. This will obviously slow down the end-to-end test considerably in dependent projects (buildbox-worker goes from 2 minutes to 4 minutes, for example), but I think it's better than "caching" the wrong repo.

Note that the pipeline here is still broken because of the aforementioned breaking change I made to buildbox-common. A working version can be seen in this branch, where I clone the fix to buildbox-worker. I'll have to merge this while the CI is still failing, then I'll need to merge buildbox-worker. Only then will the CI pass in this repo's master.

Edited by Rohit Kothur

Merge request reports