Skip to content

ci: migrator changes do not trigger building the migrator image

Created by: jhchabran

On this build @ryanslade changed the service migrator created a new service. His build succeeded but later failed on the main branch.

Failing build on main: https://buildkite.com/sourcegraph/sourcegraph/builds/118500 PR: https://buildkite.com/sourcegraph/sourcegraph/builds/118375

EDIT: this service was totally new, but the problem remains. We do not have any documentation either on how to do that.

Problem: This happened because the step building the migrator image wasn't run on the PR build, whereas it's obviously built on the main branch. This led to a failure that would have easily been avoided. Presently we have no way to tie those changes to a docker build step.

This could have been avoided if the build type had been main-dry-run, but that's not obvious at all for the CI users and they should not have to keep in mind what is tested and what it isn't, it's too much cognitive weight.

Possible solutions (non-exhaustive):

  • 🩹 The bandage solution would probably be to detect those changes and trigger the associated build by writing a specific check.
  • A more robust solution would be to be able to link the image building steps to the changed code, to fix this entire class of problem at once.
  • (something else?) ...