Warn about exceeding the global concurrency limit when setting up a new runner
What does this MR do?
There are two concurrency settings: a global maximal concurrency across all runners (set in the global config section) and a request-specific one called request_concurrency
in the runners section of the config file.
This MR adds a warning similar to https://gitlab.com/gitlab-org/gitlab-runner/-/blob/1ab213b23ffbbd4087386271dcc377d4e7ddebcb/commands/register.go#L408-415 when the request-specific concurrency setting of a newly created runner configuration exceeds the global concurrency limit.
Please provide guidance if we misunderstand the meaning of these values or another solution is better.
Why was this MR needed?
A request_concurrency
setting that is larger than the global concurrency
setting doesn't make sense.
What's the best way to test this MR?
- Have a runner configured with global
concurrency
of 1. - Set up a new runner with
request_concurrency
of 4 by runningout/binaries/gitlab-runner --log-level warn register -n -r <token> -u <url> --request-concurrency 4 --executor shell
- observe the warning