Gitlab runner ignores 'limit' configuration option
Summary
The limit
configuration option in config.toml
is ignored and a runner can run more times than specified.
Steps to reproduce
- Set the
concurrent
configuration option inconfig.toml
to a number greater than 1 (I used 4). - Create as many runners as the number specified in
concurrent
. - Set the
limit
option for each runner to 1. - Trigger more than
concurrent
pipelines to run at once using Git pushes (i.e. more than 4). - See that at least sometimes, a runner that is supposed to be limited to 1 concurrent execution can actually be running in parallel with itself to cover all of the jobs scheduled.
Actual behavior
A runner might be active multiple times at once, instead of following the limit directive (in this case, set to 1, indicating no concurrency for that runner).
Expected behavior
The limit directive is respected and a runner can be active at most as many times as is specified by limit
(and as is indicated in the documentation).
Environment description
Using shell executors on self-hosted instance.
Used GitLab Runner version
Version: 10.0.0
Git revision: 2055cfdc
Git branch:
GO version: go1.8.3
Built: Fri, 22 Sep 2017 12:41:00 +0000
OS/Arch: linux/amd64