Skip to content

Remove runner prefix from user-defined labels used in service containers

In the context of Fix issue #29381: Missing labels from Docker co... (!4913 - merged) we've implemented labelling of docker service containers. In that change set we used a labelling method that would prefix the user-defined labels from the runner config with the gitlab-runner prefix (com.gitlab.gitlab-runner). This is incorrect behavior and doesn't align with how the build / job containers are labelled.

This is a bugfunctional, but fixing it results in a breaking change. According to our breaking change policy this warrants a breaking change exception.

In the meantime (in the context of fixing Some container labels have double prefix (#38674 - closed)), we've also added the user-defined labels from the runner config without the runner prefix to the docker service containers. For backwards-compatibility we kept the prefixed labels. We can remove them as soon as we have an approval for the aforementioned breaking change exception.