Mark ConfigExecTimeout as optional
Problem: when running gitlab-runner list
with [runners.custom]
section that has no config_exec_timeout
field defined, GitLab Runner throws the following warning:
There might be a problem with your config based on jsonschema annotations in common/config.go (experimental feature):
jsonschema: '/runners/0/custom/config_exec_timeout' does not validate with https://gitlab.com/gitlab-org/gitlab-runner/common/config#/$ref/properties/runners/items/$ref/properties/custom/$ref/properties/config_exec_timeout/type: expected integer, but got null
However, GitLab Runner can actually handle this value being empty, see https://gitlab.com/gitlab-org/gitlab-runner/-/blob/fa52677c2bba605c4971a6d61ddabc66b1690b3d/executors/custom/config.go#L14-16.
Solution: mark ConfigExecTimeout
as omitempty
, similarly to how PrepareExecTimeout
and CleanupExecTimeout
are marked currently.