Refactor GPT config through unification and defaults
While working on !245 (closed) it became clear that while some problems were solved others were introduced such as taking away potential advanced customisation from certain users.
To improve our configuration for GPT we need to look at more complete options. As such, I'm proposing unifying the entire config stack along with having defaults (kind of like GitLab does).
A prospective gem that will allow us to do this is config. With this gem we would switch to unified config structure (yml). We would have defaults in the main config file and then specific environment config in specific files that will be all merged at runtime automatically. There's also scope to hook in environment variables as well to unify those further.
Through this most users will only need to do configure their environment file with very few settings and then can add in more config as required for more advanced use cases. k6 specific config will also be supported here.
Additional benefits include config parsed automatically by the gem so we don't need as much of it.
Default config file example
# Test Config
test_config:
target_user_count: 100
rps: 0
duration: 60s
latency: 0
# Test Data
test_data:
root_group: gpt
large_projects:
group: large_projects
large_project_data:
gitlabhq:
version: 1
branch: 10-0-stable
commit_sha: 8f9beefa
commit_sha_signed: 6526e91f
compare_commits_sha:
- aec887ab
- 5bfb7558
file_source_path: fixtures%2femojis%2findex%2ejson
file_rendered_path: CHANGELOG%2emd
file_blame_path: spec%2fmodels%2fproject_spec%2erb
dir_path: spec%2Flib%2Fgitlab
git_push_data:
branch_current_head_sha: 8606c89683c913641243fc667edeb90600fe1a0e
branch_new_head_sha: 8bcb4fd6f5780ebe9dc1ec80904b060b89a937d2
branch_name: 12-1-auto-deploy-20190714
mr_commits_iid: '10495'
mr_discussions_iid: '6958'
search:
projects: gitlab
issues: broken
commits: fix
merge_requests: fix
milestones: '2.6'
blobs: test
users: root
issue_iid: '4218'
many_groups_and_projects:
group: many_groups_and_projects
subgroups: 250
subgroup_prefix: gpt-subgroup-
projects: 10
project_prefix: gpt-project-
k6_config:
Environment config file example
environment:
name: 10k
url: http://10k.testbed.gitlab.net
user: root
storage_nodes:
- default
- storage2
test_config:
target_user_count: 10000
duration: '60s'
This will be a big change so it will require a notable new release, either 2.1.0
or 3.0.0
- still deciding on that one.