cirruslabs / gitlab-tart-executor

GitLab Runner executor to run jobs in Tart VMs
MIT License
60 stars 5 forks source link

gitlab-runner registration timeout arguments are missing #25

Closed rgl closed 1 year ago

rgl commented 1 year ago

With gitlab-runner 15.10.1, while listing the runners, it shows warning alike:

% gitlab-runner list
Runtime platform                                    arch=arm64 os=darwin pid=40114 revision=dcfb4b66 version=15.10.1
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

Listing configured runners                          ConfigFile=/Users/admin/.gitlab-runner/config.toml
macos-tart                                         Executor=custom Token=xpto URL=https://git.example.com
a

Please update/advise the README to include these arguments:

% gitlab-runner register --help | grep timeout | grep custom
   --custom-config-exec-timeout value                                                         Timeout for the config executable (in seconds) [$CUSTOM_CONFIG_EXEC_TIMEOUT]
   --custom-prepare-exec-timeout value                                                        Timeout for the prepare executable (in seconds) [$CUSTOM_PREPARE_EXEC_TIMEOUT]
   --custom-cleanup-exec-timeout value                                                        Timeout for the cleanup executable (in seconds) [$CUSTOM_CLEANUP_EXEC_TIMEOUT]
   --custom-graceful-kill-timeout value                                                       Graceful timeout for scripts execution after SIGTERM is sent to the process (in seconds). This limits the time given for scripts to perform the cleanup before exiting [$CUSTOM_GRACEFUL_KILL_TIMEOUT]
   --custom-force-kill-timeout value                                                          Force timeout for scripts execution (in seconds). Counted from the force kill call; if process will be not terminated, Runner will abandon process termination and log an error [$CUSTOM_FORCE_KILL_TIMEOUT]
edigaryev commented 1 year ago

I don't think we need to fix anything on the GitLab Tart Executor's side because these values are already optional. And realistically, we won't be able to provide a good default values because each system running Tart is different.

GitLab Runner's config_exec_timeout field is missing an omitempty JSON annotation for some reason, which is causing this JSON Schema validation warning.

I've created GitLab Runner PR to address this: https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/4145.