feat: add preemptive_mode
option passthrough on docker_autoscaler
#1344
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Allow passthrough of the preemptive_mode value on the runner_worker_docker_autoscaler_autoscaling_options as described on the doc that is linked on the code https://docs.gitlab.com/runner/configuration/advanced-configuration/#the-runnersautoscalerpolicy-sections
Should resolve the error on the message logs
gitlab-runner: jsonschema: '/runners/0/Autoscaler/Policy/0/PreemptiveMode' does not validate with https://gitlab.com/gitlab-org/gitlab-runner/common/config#/$ref/properties/runners/items/$ref/properties/Autoscaler/$ref/properties/Policy/items/$ref/properties/PreemptiveMode/type: expected boolean, but got null
Migrations required
No migrations required
Verification
Ive confirmed this by adding the preemptive_mode value on the runner_worker_docker_autoscaler_autoscaling_options properties and confirmed by enabled the "debug_write_runner_config_to_file = true" to see it being added on the runners autoscaler policy