-
-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor!: rename variables and prefix with runner_manager
, runner
, runner_worker
and global scope
#757
Conversation
## Description Removes the earlier deprecated `runners_pull_policy` variable. Since were making a Major release I thought this one was nice to catch. ## Migrations required YES. Replace the `runners_pull_policy` by `runners_pull_policies`.
## Description This PR removes all variables which are marked as deprecated. - `arn_format` - `subnet_id_runners` - `subnet_ids_gitlab_runner` - `asg_terminate_lifecycle_hook_create` - `asg_terminate_lifecycle_hook_heartbeat_timeout` - `asg_terminate_lifecycle_lambda_memory_size` - `asg_terminate_lifecycle_lambda_runtime` - `asg_terminate_lifecycle_lambda_timeout` ## Migrations required Yes. Remove the variables from your configuration. This is done automatically by the migration script. ## Verification None. --------- Co-authored-by: Tyrone Meijn <tyrone_meijn@hotmail.com>
Hey @kayman-mk! 👋 Thank you for your contribution to the project. Please refer to the contribution rules for a quick overview of the process. Make sure that this PR clearly explains:
With submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this LICENSE. The following ChatOps commands are supported:
Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command. This message was generated automatically. You are welcome to improve it. |
🦙 MegaLinter status: ❌ ERROR
See detailed report in MegaLinter reports |
Did some experiments today. I think, it is not a good idea to use blocks. They look good and structure the variables into groups. Blocks can be grouped in other blocks, which gives a good strucuture for the variables. But the drawback is, that I can't document these variables in a way to get support from my IDE. So I will go with the following: module "gitlab_runner" {
agent_var_1 = 1
agent_var_2 = 2
executor_var_ 1 = 1
} instead of module "gitlab_runner" {
agent {
var_1 = 1
var_2 = 2
}
executor {
var_1 = 1
}
} |
I'm a bit confused... module "gitlab_runner" {
agent {
var_1 = 1
var_2 = 2
}
executor {
var_1 = 1
}
} AFAIK this syntax is not possible for modules and can only be defined for provider resources and datasources. |
You are right. There is a |
agent
, executor
and global scopeagent
, executor
and global scope
## Description Removes the earlier deprecated `runners_pull_policy` variable. Since were making a Major release I thought this one was nice to catch. ## Migrations required YES. Replace the `runners_pull_policy` by `runners_pull_policies`.
## Description This PR removes all variables which are marked as deprecated. - `arn_format` - `subnet_id_runners` - `subnet_ids_gitlab_runner` - `asg_terminate_lifecycle_hook_create` - `asg_terminate_lifecycle_hook_heartbeat_timeout` - `asg_terminate_lifecycle_lambda_memory_size` - `asg_terminate_lifecycle_lambda_runtime` - `asg_terminate_lifecycle_lambda_timeout` ## Migrations required Yes. Remove the variables from your configuration. This is done automatically by the migration script. ## Verification None. --------- Co-authored-by: Tyrone Meijn <tyrone_meijn@hotmail.com>
3fdd3c5
to
c78907a
Compare
## Description Removes the earlier deprecated `runners_pull_policy` variable. Since were making a Major release I thought this one was nice to catch. ## Migrations required YES. Replace the `runners_pull_policy` by `runners_pull_policies`.
This PR removes all variables which are marked as deprecated. - `arn_format` - `subnet_id_runners` - `subnet_ids_gitlab_runner` - `asg_terminate_lifecycle_hook_create` - `asg_terminate_lifecycle_hook_heartbeat_timeout` - `asg_terminate_lifecycle_lambda_memory_size` - `asg_terminate_lifecycle_lambda_runtime` - `asg_terminate_lifecycle_lambda_timeout` Yes. Remove the variables from your configuration. This is done automatically by the migration script. None. --------- Co-authored-by: Tyrone Meijn <tyrone_meijn@hotmail.com>
c78907a
to
93657e6
Compare
## Description Removes the earlier deprecated `runners_pull_policy` variable. Since were making a Major release I thought this one was nice to catch. ## Migrations required YES. Replace the `runners_pull_policy` by `runners_pull_policies`.
babc50a
to
3662eeb
Compare
@tmeijn Counted 126 variables in the module so far. I will follow your suggestion and group them into a map despite the documentation issues I had. I think it is worth to reference the GitLab/Docker Machine documentation and not to repeat everything here again. |
## Description Adds a new variable `runners_docker_options` which holds all values for the `[runners.docker]` section and makes the single variables - `runners_image` - `runners_privileged` - `runners_disable_cache` - `runners_additional_volumes` - `runners_shm_size` - `runners_docker_runtime` - `runners_helper_image` - `runners_pull_policy` obsolete. ## Migrations required Yes, as the minimum Terraform version is 1.3.0 to support optional block variables with defaults. A migration script is provided to restructure the variables. See `/migrations/migrate-to-7-0-0.sh`. Attention Mac users: The script will not work out of the box as the `sed` implementation is different. Use a Docker container with Alpine or Ubuntu to run the script. ```hcl module "gitlab_ci_runner" { ... runners_docker_options { # set whatever is necessary } ``` ## Verification - [x] Use current configuration and ensure that the `config.toml` remains unchanged - [x] Set all new block variables and ensure that the `config.toml` is valid (use `gitlab-runner verify) - [x] Check that the default settings with Terraform 1.3 work as expected - [x] Verify all docker settings against the documentation to ensure correct names The runner starts in both cases and is available in Gitlab. No example tested but used our active configuration at Hapag-Lloyd. --------- Co-authored-by: Tyrone Meijn <tyrone_meijn@hotmail.com>
agent
, executor
and global scoperunner_manager
, runner
, runner_worker
and global scope
@npalm This one is ready now and will be merged into I will further group variables were it makes sense as we have 118 now. Grouping into objects helps everyone to stay on top, I think. But I create a separate PR for this. |
26a6d19
to
dc5a758
Compare
Closed in favor of #810 which includes the renaming and restructuring. |
Description
Moves all variables to a new block:
runner_manager
in case it configures the "main" process which sets the defaults for all runnersrunner
in case it configures the runner created by the runner managerrunner_worker
in case it configures the docker/docker+machineCloses #575
Migrations required
Yes. Use the provided script to migrate to version 7.0
Verification
Please mention the examples you have verified.