Skip to content

Commit e0351dc

Browse files
committed
Change concurrency to tempest specific parameter
This patch introduces the cifmw_test_operator_tempest_concurrency parameter, as current concurrency parameter is used only in Tempest tests. It will also allow the stages loop to include concurrency, so now users can set different concurrencies for different tempest runs.
1 parent dfb2ab9 commit e0351dc

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

roles/test_operator/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Execute tests via the [test-operator](https://openstack-k8s-operators.github.io/
1010
* `cifmw_test_operator_version`: (String) The commit hash corresponding to the version of test-operator the user wants to use. This parameter is only used when `cifmw_test_operator_bundle` is also set.
1111
* `cifmw_test_operator_timeout`: (Integer) Timeout in seconds for the execution of the tests. Default value: `3600`
1212
* `cifmw_test_operator_logs_image`: (String) Image that should be used to collect logs from the pods spawned by the test-operator. Default value: `quay.io/quay/busybox`
13-
* `cifmw_test_operator_concurrency`: (Integer) Tempest concurrency value. Default value: `8`
13+
* `cifmw_test_operator_concurrency`: (Integer) Tempest concurrency value. NOTE: This parameter is deprecated, please use `cifmw_test_operator_tempest_concurrency` instead. Default value: `8`
1414
* `cifmw_test_operator_cleanup`: (Bool) Delete all resources created by the role at the end of the testing. Default value: `false`
1515
* `cifmw_test_operator_tempest_cleanup`: (Bool) Run tempest cleanup after test execution (tempest run) to delete any resources created by tempest that may have been left out.
1616
* `cifmw_test_operator_default_groups`: (List) List of groups in the include list to search for tests to be executed. Default value: `[ 'default' ]`
@@ -34,7 +34,7 @@ Execute tests via the [test-operator](https://openstack-k8s-operators.github.io/
3434
* `type`: (String) The framework name you would like to call, currently the options are: tempest, ansibletest, horizontest, tobiko.
3535
* `test_vars_file`: (String) Path to the file used for testing, this file should contain the testing params for this stage. Only parameters specific for the controller can be used (Tempest, Ansibletest, Horizontest and Tobiko).
3636
* `test_vars`: (String) Testing parameters for this specific stage if a `test_vars` is used the specified parameters would override the ones in the `test_vars_file`. Only parameters specific for the controller can be used (Tempest, Ansibletest, Horizontest and Tobiko).
37-
> Important note! Only variables with the following structure can be used to override inside a stage: `cifmw_test_operator_[test-operator CR name]_[parameter name]`. For example, these variables cannot be overridden per stage: `cifmw_test_operator_concurrency`, `cifmw_test_operator_default_registry`, `cifmw_test_operator_default_namespace`, `cifmw_test_operator_default_image_tag`.
37+
> Important note! Only variables with the following structure can be used to override inside a stage: `cifmw_test_operator_[test-operator CR name]_[parameter name]`. For example, these variables cannot be overridden per stage: `cifmw_test_operator_default_registry`, `cifmw_test_operator_default_namespace`, `cifmw_test_operator_default_image_tag`.
3838
* `pre_test_stage_hooks`: (List) List of pre hooks to run as described [hooks README](https://github.com/openstack-k8s-operators/ci-framework/tree/main/roles/run_hook#hooks-expected-format).
3939
* `post_test_stage_hooks`: (List) List of post hooks to run as described [hooks README](https://github.com/openstack-k8s-operators/ci-framework/tree/main/roles/run_hook#hooks-expected-format).
4040
Default value:
@@ -52,6 +52,7 @@ cifmw_test_operator_stages:
5252
* `cifmw_test_operator_tempest_container`: (String) Name of the tempest container. Default value: `openstack-tempest`
5353
* `cifmw_test_operator_tempest_image`: (String) Tempest image to be used. Default value: `{{ cifmw_test_operator_tempest_registry }}/{{ cifmw_test_operator_tempest_namespace }}/{{ cifmw_test_operator_tempest_container }}`
5454
* `cifmw_test_operator_tempest_image_tag`: (String) Tag for the `cifmw_test_operator_tempest_image`. Default value: `{{ cifmw_test_operator_default_image_tag }}`
55+
* `cifmw_test_operator_tempest_concurrency`: (Integer) The number of worker processes running tests concurrently. Default value: `8`
5556
* `cifmw_test_operator_tempest_include_list`: (String) List of tests to be executed. Setting this will not use the `list_allowed` plugin. Default value: `''`
5657
* `cifmw_test_operator_tempest_exclude_list`: (String) List of tests to be skipped. Setting this will not use the `list_skipped` plugin. Default value: `''`
5758
* `cifmw_test_operator_tempest_expected_failures_list`: (String) List of tests for which failures will be ignored. Default value: `''`
@@ -95,7 +96,7 @@ Default value: {}
9596
{{ cifmw_test_operator_tempest_include_list | default('') }}
9697
excludeList: |
9798
{{ cifmw_test_operator_tempest_exclude_list | default('') }}
98-
concurrency: "{{ cifmw_test_operator_concurrency }}"
99+
concurrency: "{{ cifmw_test_operator_tempest_concurrency | default(8) }}"
99100
externalPlugin: "{{ cifmw_test_operator_tempest_external_plugin | default([]) }}"
100101
extraRPMs: "{{ cifmw_test_operator_tempest_extra_rpms | default([]) }}"
101102
extraImages: "{{ cifmw_test_operator_tempest_extra_images | default([]) }}"

roles/test_operator/defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ cifmw_test_operator_tempest_config:
140140
{{ stage_vars_dict.cifmw_test_operator_tempest_exclude_list | default('') }}
141141
expectedFailuresList: |
142142
{{ stage_vars_dict.cifmw_test_operator_tempest_expected_failures_list | default('') }}
143-
concurrency: "{{ cifmw_test_operator_concurrency }}"
143+
# NOTE: cifmw_test_operator_concurrency is deprecated, use cifmw_test_operator_tempest_concurrency instead
144+
concurrency: "{{ stage_vars_dict.cifmw_test_operator_tempest_concurrency | default(cifmw_test_operator_concurrency) }}"
144145
externalPlugin: "{{ stage_vars_dict.cifmw_test_operator_tempest_external_plugin | default([]) }}"
145146
extraRPMs: "{{ stage_vars_dict.cifmw_test_operator_tempest_extra_rpms | default([]) }}"
146147
extraImages: "{{ stage_vars_dict.cifmw_test_operator_tempest_extra_images | default([]) }}"

0 commit comments

Comments
 (0)