Friendly validation of config.toml when runner starts or reloads config
We identified that there's some areas to improve how friendly it is to use the GitLab-Runner when doing some competitive analysis.
One aspect that would greatly help is some level of validation of the config.toml
when we load it (note that this is done at start up and periodically to detect changes).
For example. Given the config.toml
of:
concurrent = 1
check_interval = 0
shutdown_timeout = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "Elliots-MacBook-Pro.local"
url = "https://gitlab.com"
id = 20723629
token = "hahaha-nope"
token_obtained_at = 2023-01-27T19:37:01Z
token_expires_at = 0001-01-01T00:00:00Z
executor = "ssh"
[runners.custom_build_dir]
[runners.cache]
MaxUploadedArchiveSize = 0
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[runners.ssh]
user = "foo"
The runner will start fine and poll for jobs. However the [runners.ssh]
section is missing the host
entry - which is pretty much a hard requirement for SSH
(note there does appear to be some default - I suspect localhost? But the error that appears if you go down this path does NOT immediately help you figure out you have forgotten to put a host
).