Skip to content

Commit f644ee9

Browse files
authored
OSPRH-16753: Converge autoscaling logging & graphing tests based on enabled features (infrawatch#275)
* [ci] Converge autoscaling & graphing osp18 tests based on enabled features * [ci] Create functional-tests-osp18 job * [ci] Rename run_cloudops_tests_osp18.yml to run_autoscaling_tests.yml * [ci] Improve fvt skip tests logic * [ci] Consolidate autoscaling and graphing playbooks into functional playbook * [ci] Merge vars-logging-test playbook into vars-functional-test * [ci] Rename logging tests * [ci] Update github-check with functional-tests-osp18
1 parent 0d30a9d commit f644ee9

File tree

7 files changed

+104
-104
lines changed

7 files changed

+104
-104
lines changed

.zuul.yaml

Lines changed: 35 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
- job:
3-
name: functional-autoscaling-tests-osp18
3+
name: functional-tests-osp18
44
dependencies: ["telemetry-openstack-meta-content-provider-master"]
55
parent: telemetry-operator-multinode-autoscaling
66
description: |
77
Run autoscaling functional tests, tempest tests, metrics
8-
functional tests and logging functional tests on
8+
functional tests, graphing functional tests and logging functional tests on
99
osp18+patched versions of aodh and heat.
1010
extra-vars: &functional_autoscaling_extra_vars
1111
# Override zuul meta content provider provided content_provider_dlrn_md5_hash
@@ -15,12 +15,12 @@
1515
vars:
1616
patch_observabilityclient: true
1717
cifmw_update_containers: false
18+
crc_enable_monitoring: true
1819
cifmw_extras:
1920
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}/scenarios/centos-9/multinode-ci.yml"
2021
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-autoscaling.yml"
2122
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-logging.yml"
2223
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-power-monitoring.yml"
23-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-logging-test.yml"
2424
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-autoscaling-tempest.yml"
2525
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-functional-test.yml"
2626
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-use-master-containers.yml"
@@ -61,36 +61,40 @@
6161

6262
- job:
6363
name: functional-tests-on-osp18
64-
parent: functional-autoscaling-tests-osp18
64+
parent: functional-tests-osp18
6565
extra-vars: *functional_autoscaling_extra_vars
6666
description: |
67-
functional-tests-on-osp18 is an alias of functional-autoscaling-tests-osp18,
67+
functional-tests-on-osp18 is an alias of functional-tests-osp18,
6868
temporary added until openstack-k8s-operators/telemetry-operator updates
6969
references of functional-tests-on-osp18 jobs.
7070
71+
- job:
72+
name: functional-autoscaling-tests-osp18
73+
parent: functional-tests-osp18
74+
description: |
75+
functional-autoscaling-tests-osp18 is an alias of functional-tests-osp18,
76+
temporary added until openstack-k8s-operators/telemetry-operator updates
77+
references of functional-tests-osp18.
78+
79+
- job:
80+
name: functional-graphing-tests-osp18
81+
parent: functional-tests-osp18
82+
description: |
83+
functional-graphing-tests-osp18 is an alias of functional-tests-osp18,
84+
temporary added until openstack-k8s-operators/telemetry-operator updates
85+
references of functional-tests-osp18.
86+
7187
- job:
7288
name: functional-logging-tests-osp18
73-
dependencies: ["telemetry-openstack-meta-content-provider-master"]
74-
parent: telemetry-operator-multinode-logging
89+
parent: functional-tests-osp18
7590
description: |
76-
Run the logging functional tests and tempest smoketests on osp18
77-
extra-vars: *functional_autoscaling_extra_vars
78-
vars:
79-
cifmw_update_containers: false
80-
cifmw_extras:
81-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}/scenarios/centos-9/multinode-ci.yml"
82-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-logging.yml"
83-
# Use the tempest config we have for autoscaling tests
84-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-autoscaling-tempest.yml"
85-
# There's an override in here to modify the enabled tests to include only the smoke tests
86-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-logging-test.yml"
87-
roles:
88-
- zuul: github.com/openstack-k8s-operators/ci-framework
89-
required-projects: *required_projects
91+
functional-logging-tests-osp18 is an alias of functional-tests-osp18,
92+
temporary added until openstack-k8s-operators/telemetry-operator updates
93+
references of functional-tests-osp18.
9094
9195
- job:
9296
name: functional-metric-verification-tests-osp18
93-
parent: functional-autoscaling-tests-osp18
97+
parent: functional-tests-osp18
9498
extra-vars: *functional_autoscaling_extra_vars
9599
description: |
96100
Run the autoscaling functional tests, tempest tests and metrics
@@ -105,35 +109,18 @@
105109
run:
106110
- ci/noop.yml
107111

108-
- job:
109-
name: functional-graphing-tests-osp18
110-
dependencies: ["telemetry-openstack-meta-content-provider-master"]
111-
parent: telemetry-operator-multinode-autoscaling
112-
description: |
113-
Run the UI Graphing test and tempest smoketests on osp18.
114-
vars:
115-
cifmw_update_containers: false
116-
crc_enable_monitoring: true
117-
cifmw_extras:
118-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}/scenarios/centos-9/multinode-ci.yml"
119-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-autoscaling.yml"
120-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-power-monitoring.yml"
121-
# Use the tempest config we have for autoscaling tests
122-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-autoscaling-tempest.yml"
123-
# Currently, this runs tempest smoketests after the dashboards have been disabled again
124-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-graphing-test.yml"
125-
roles:
126-
- zuul: github.com/openstack-k8s-operators/ci-framework
127-
required-projects: *required_projects
128-
extra-vars: *functional_autoscaling_extra_vars
129-
130112
- job:
131113
name: functional-periodic-telemetry-with-ceph
132114
parent: podified-multinode-hci-deployment-crc-1comp-backends
133115
dependencies: ["telemetry-openstack-meta-content-provider-master"]
134116
description: |
135117
Deploy OpenStack with Telemetry and Ceph. Run metric-verification with volume pool metric tests
136-
extra-vars: *functional_autoscaling_extra_vars
118+
extra-vars:
119+
# Override zuul meta content provider provided content_provider_dlrn_md5_hash
120+
# var. As returned dlrn md5 hash comes from master release but job is using
121+
# antelope content.
122+
content_provider_dlrn_md5_hash: ''
123+
run_graphing_test: false
137124
vars:
138125
patch_observabilityclient: true
139126
cifmw_update_containers: false
@@ -152,7 +139,6 @@
152139
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}/scenarios/centos-9/multinode-ci.yml"
153140
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}/scenarios/centos-9/hci_ceph_backends.yml"
154141
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-telemetry-with-ceph.yml"
155-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-logging-test.yml"
156142
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-autoscaling-tempest.yml"
157143
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-functional-test.yml"
158144
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-use-master-containers.yml"
@@ -172,40 +158,14 @@
172158
override-checkout: main
173159
- feature-verification-tests-noop:
174160
files: *irrelevant_files
175-
- functional-autoscaling-tests-osp18:
161+
- functional-tests-osp18:
176162
files:
177163
- roles/telemetry_autoscaling/.*
178-
- roles/common/*
179-
- .zuul.yaml
180-
- ci/vars-functional-test.yml
181-
- ci/run_cloudops_tests_osp18.yml
182-
- ci/vars-use-master-containers.yml
183-
- ci/use-master-containers.yml
184-
- ci/patch-openstack-version.yaml
185-
- ci/report_result.yml
186-
- roles/telemetry_verify_metrics/.*
187-
- ci/vars-metric-verification-test.yml
188-
- functional-logging-tests-osp18:
189-
irrelevant-files: *irrelevant_files
190-
files:
164+
- roles/telemetry_graphing/.*
191165
- roles/telemetry_logging/.*
192166
- roles/common/*
167+
- roles/telemetry_verify_metrics/.*
193168
- .zuul.yaml
194-
- ci/vars-logging-test.yml
195-
- ci/logging_tests_all.yml
196-
- ci/logging_tests_computes.yml
197-
- ci/logging_tests_controller.yml
198-
- ci/report_result.yml
199-
- functional-graphing-tests-osp18:
200-
voting:
201-
false
202-
irrelevant-files: *irrelevant_files
203-
files:
204-
- roles/telemetry_graphing/.*
205-
- .zuul.yaml
206-
- ci/vars-graphing-test.yml
207-
- ci/run_graphing_test.yml
208-
- ci/report_result.yml
209169
- functional-periodic-telemetry-with-ceph:
210170
files:
211171
# Run this job for changes to the volume_pool_metrics test changes as this is

ci/run_cloudops_tests_osp18.yml renamed to ci/run_autoscaling_tests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,35 @@
88
vars_files:
99
- vars/common.yml
1010
- vars/osp18_env.yml
11+
pre_tasks:
12+
- name: "Notify if autoscaling test is skipped by run_autoscaling_test false"
13+
ansible.builtin.debug:
14+
msg: "Skipping the autoscaling test because run_autoscaling_test extra_vars is set to false"
15+
when: not run_autoscaling_test | default(true) | bool
16+
17+
- name: "Skip autoscaling test by run_autoscaling_test false"
18+
ansible.builtin.meta: end_play
19+
when: not run_autoscaling_test | default(true) | bool
20+
21+
- name: "Get OpenStackControlPlane autoscaling status"
22+
ansible.builtin.command: >
23+
oc get oscp -n openstack -o jsonpath='{.items[0].spec.telemetry.template.autoscaling.enabled}'
24+
register: autoscaling_status
25+
changed_when: false
26+
27+
- name: "Set fact if autoscaling is enabled"
28+
ansible.builtin.set_fact:
29+
autoscaling_enabled: "{{ autoscaling_status.stdout | trim | lower == 'true' }}"
30+
31+
- name: "Notify if autoscaling test is skipped by autoscaling status"
32+
ansible.builtin.debug:
33+
msg: "Skipping the autoscaling test because OpenStackControlPlane telemetry autoscaling is disabled"
34+
when: not autoscaling_enabled | bool
35+
36+
- name: "Skip autoscaling test by autoscaling disabled"
37+
ansible.builtin.meta: end_play
38+
when: not autoscaling_enabled | bool
39+
1140
tasks:
1241
- block:
1342
- name: Include vars from the extra_vars files

ci/run_functional_tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
- name: Run Logging test
2+
ansible.builtin.import_playbook: logging_tests_all.yml
3+
4+
- name: Run Autoscaling test
5+
ansible.builtin.import_playbook: run_autoscaling_tests.yml
6+
7+
- name: Run Graphing Console UI test
8+
ansible.builtin.import_playbook: run_graphing_test.yml

ci/run_graphing_test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,34 @@
1010
PASSWORD: "{{ cifmw_openshift_password }}"
1111
vars_files:
1212
- vars/common.yml
13+
pre_tasks:
14+
- name: "Notify if graphing test is skipped by run_graphing_test false"
15+
ansible.builtin.debug:
16+
msg: "Skipping the graphing test because run_graphing_test extra_vars is set to false"
17+
when: not run_graphing_test | default(true) | bool
18+
19+
- name: "Skip graphing test by run_graphing_test false"
20+
ansible.builtin.meta: end_play
21+
when: not run_graphing_test | default(true) | bool
22+
23+
- name: "Get OpenStackControlPlane telemetry dashboardsEnabled status"
24+
ansible.builtin.command: >
25+
oc get oscp -n openstack -o jsonpath='{.items[0].spec.telemetry.template.metricStorage.dashboardsEnabled}'
26+
register: dashboard_status
27+
changed_when: false
28+
29+
- name: "Set fact if dashboards are enabled"
30+
ansible.builtin.set_fact:
31+
dashboards_enabled: "{{ dashboard_status.stdout | trim | lower == 'true' }}"
32+
33+
- name: "Notify if graphing test is skipped by dashboardsEnabled status"
34+
ansible.builtin.debug:
35+
msg: "Skipping the graphing test because OpenStackControlPlane telemetry dashboards are disabled"
36+
when: not dashboards_enabled | bool
37+
38+
- name: "Skip graphing test by dashboardsEnabled disabled"
39+
ansible.builtin.meta: end_play
40+
when: not dashboards_enabled | bool
1341
tasks:
1442
- block:
1543
- name: "Run Graphing Console UI tests"

ci/vars-functional-test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
# skip os-net-setup
77
cifmw_os_net_setup_config: []
88
pre_tests_00_run_functional_test:
9-
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/run_cloudops_tests_osp18.yml"
9+
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/run_functional_tests.yml"
1010
type: playbook
11+
extra_vars:
12+
run_autoscaling_test: true
13+
run_graphing_test: true
1114
config_file: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/ansible.cfg"
1215
cifmw_run_tests: true
1316
# redefine this to clear the skipped test

ci/vars-graphing-test.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

ci/vars-logging-test.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)