Rename [[runners]] to [[workers]], with all it consequences
I had a chat with @bjk-gitlab today, and it was another time when someone not familiar with Runner's internals was very confused by the fact, that we're using the name runner
in too many scopes when it goes for GitLab CI execution system:
- We have the GitLab Runner project that provides a
gitlab-runner
binary which runs the process on some machine. - We have the
[[runners]]
section, which represent something that in fact is a worker. But we're also naming this a runner (when talking about GitLab Runner, in the configuration, in documentation and even in code - e.g.c.processRunner()
!). It's a different thing, different context, but it uses the runner name. - Finally, we have the place where the job is in fact executed, whether it will be a local shell, VirtualBox machine or external VM with Docker container on it, managed by Docker Machine. We also reference this as a runner because this is what in fact runs the script.
The name runner is repeated too often here. And for someone who starts his adventure with GitLab CI or who doesn't work much with the Runner part of GitLab CI, all of this is much confusing.
My proposition is to start renaming things, starting with [[runners]]
section and all configuration/documentation/implementation parts that are working with this. What this section of config.toml
file represents is the concept of worker
, just like we have in - for example - Nginx, where one Nginx process starts several workers that are handling the connections. Here we have one GitLab Runner process that starts several workers, where each of them handles jobs execution with provided configuration.
To make this happen, we should:
-
Start renaming things internal for the codebase (like the name of methods, etc.). This can be started right now and finished whenever we'll manage to do this, without worrying about Major version updates.
-
Deprecate the
[[runners]]
section inconfig.toml
file immediately and notify, that we will drop support for this, and replace this with[[workers]]
in %12.0. This is a backward incompatible change that will require some manual actions (updating the configuration files, updating all user's tools that are managing the files).The sooner we do this, the less painful it will be. It's not nice type of changes, but I think it should be done. And a Major version update is the only moment when we can handle this. If we will not do this before %12.0, then the next occasion we will have with
13.0
, which is more than year from now, looking on the recent timings of Major version updates. -
Start adding implementation changes of things that are external, but can have backward compatible version still available until %12.0, e.g. the names of labels in exported Prometheus metrics (what is described at #3626 (comment 110353643)).
A separated thing is that we should probably thing about renaming GitLab Runner
to GitLab Runner Manager
... but we've already changed the project name last year and it was very painful. So maybe let's focus now on changing the name of [[runners]]
which seems to be more confusing for users.
@ayufan @nolith @jlenny I'd like to get your input about this proposition.