Merge ~jocave/plainbox-provider-checkbox:reduce-requires-complexity into plainbox-provider-checkbox:master

Proposed by Jonathan Cave
Status: Merged
Approved by: Jonathan Cave
Approved revision: d527f39fae8167512d40adc9acc57224ce037863
Merged at revision: be22756729fcc32621e3e0b3897f56e74014b498
Proposed branch: ~jocave/plainbox-provider-checkbox:reduce-requires-complexity
Merge into: plainbox-provider-checkbox:master
Diff against target: 270 lines (+34/-32)
9 files modified
units/disk/jobs.pxu (+6/-6)
units/ethernet/jobs.pxu (+11/-11)
units/info/jobs.pxu (+6/-6)
units/memory/jobs.pxu (+1/-1)
units/miscellanea/jobs.pxu (+4/-4)
units/power-management/jobs.pxu (+3/-1)
units/stress/jobs.pxu (+1/-1)
units/submission/jobs.pxu (+1/-1)
units/virtualization/jobs.pxu (+1/-1)
Reviewer Review Type Date Requested Status
Maciej Kisielewski Approve
Review via email: mp+388798@code.launchpad.net

Description of the change

Simplification of requires fields to reduce complexity when evaluating the inhibitor lists.

On runs where the package resource and executable resource contain a very large number of records (typically Focal desktop image test runs), I have seen the matrix of possible resource combinations reach such a high number that is can take minutes (3 minutes per evaluation on a Atom E3815) for the processing to complete.

By removing cases where these large resources are combined this seems to be avoided and the maximum time for job readiness evaluation reduced to a few seconds.

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

Brilliant stuff. +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/units/disk/jobs.pxu b/units/disk/jobs.pxu
2index 8b4f943..8101de5 100644
3--- a/units/disk/jobs.pxu
4+++ b/units/disk/jobs.pxu
5@@ -2,7 +2,7 @@ plugin: shell
6 category_id: com.canonical.plainbox::disk
7 id: disk/detect
8 requires:
9- package.name == 'util-linux' or executable.name == 'lsblk'
10+ executable.name == 'lsblk'
11 _summary: Gathers information about each disk detected
12 _description:
13 Uses lsblk to gather information about each disk detected on the system
14@@ -41,8 +41,8 @@ category_id: com.canonical.plainbox::disk
15 id: disk/smart_{name}
16 estimated_duration: 180.0
17 requires:
18- package.name == 'smartmontools' or executable.name == 'smartctl'
19- block_device.smart == 'True' and block_device.name == '{name}'
20+ executable.name == 'smartctl'
21+ block_device.smart == 'True' and block_device.name == '{name}'
22 _summary:
23 Test SMART capabilities for {product_slug}
24 _description:
25@@ -100,8 +100,8 @@ id: disk/disk_stress_ng_{name}
26 estimated_duration: 4560.0
27 user: root
28 requires:
29- package.name == 'stress-ng' or executable.name == 'stress-ng'
30- package.name == 'uuid-runtime' or executable.name == 'uuidgen'
31+ executable.name == 'stress-ng'
32+ executable.name == 'uuidgen'
33 _summary: Disk stress_ng test for {product_slug}
34 _description: Disk stress_ng test for {product_slug}
35 command:
36@@ -124,7 +124,7 @@ estimated_duration: 15
37 user: root
38 requires:
39 block_device.state != 'removable' and block_device.name == '{name}'
40- package.name == 'bc' or executable.name == 'bc'
41+ executable.name == 'bc'
42 _summary: Check of CPU load imposed by {product_slug}
43 _description: Check to ensure CPU load of {product_slug} is not too high
44 command: disk_cpu_load.sh {name}
45diff --git a/units/ethernet/jobs.pxu b/units/ethernet/jobs.pxu
46index 22f53b6..36c25f4 100644
47--- a/units/ethernet/jobs.pxu
48+++ b/units/ethernet/jobs.pxu
49@@ -63,9 +63,9 @@ id: ethernet/multi_nic_device{__index__}_{interface}
50 _summary: Multi-NIC Iperf stress testing for NIC {interface}
51 estimated_duration: 7400.0
52 requires:
53- package.name == 'iperf' or executable.name == 'iperf'
54- package.name == 'ethtool' or executable.name == 'ethtool'
55- package.name == 'nmap' or executable.name == 'nmap'
56+ executable.name == 'iperf'
57+ executable.name == 'ethtool'
58+ executable.name == 'nmap'
59 user: root
60 environ: TEST_TARGET_IPERF
61 command: network.py test -i {interface} -t iperf --scan-timeout 3600 --fail-threshold 80 --runtime 900 --num_runs 4
62@@ -82,9 +82,9 @@ id: ethernet/multi_iperf3_nic_device{__index__}_{interface}
63 _summary: Multi-NIC Iperf3 stress testing for NIC {interface}
64 estimated_duration: 7400.0
65 requires:
66- package.name == 'iperf3' or executable.name == 'iperf3'
67- package.name == 'ethtool' or executable.name == 'ethtool'
68- package.name == 'nmap' or executable.name == 'nmap'
69+ executable.name == 'iperf3'
70+ executable.name == 'ethtool'
71+ executable.name == 'nmap'
72 user: root
73 environ: TEST_TARGET_IPERF
74 command: network.py test -i {interface} -t iperf --iperf3 --scan-timeout 3600 --fail-threshold 80 --cpu-load-fail-threshold 90 --runtime 900 --num_runs 4
75@@ -101,9 +101,9 @@ id: ethernet/multi_iperf3_nic_underspeed_device{__index__}_{interface}
76 _summary: Underspeed Enabled Multi-NIC Iperf3 stress testing for NIC {interface}
77 estimated_duration: 7400.0
78 requires:
79- package.name == 'iperf3' or executable.name == 'iperf3'
80- package.name == 'ethtool' or executable.name == 'ethtool'
81- package.name == 'nmap' or executable.name == 'nmap'
82+ executable.name == 'iperf3'
83+ executable.name == 'ethtool'
84+ executable.name == 'nmap'
85 user: root
86 environ: TEST_TARGET_IPERF
87 command: network.py test -i {interface} -t iperf --iperf3 --scan-timeout 3600 --fail-threshold 80 --cpu-load-fail-threshold 90 --runtime 900 --num_runs 4 --underspeed-ok
88@@ -120,7 +120,7 @@ id: ethernet/ethertool_check_device{__index__}_{interface}
89 _summary: ethtool check for NIC {interface}
90 estimated_duration: 330.0
91 requires:
92- package.name == 'ethtool' or executable.name == 'ethtool'
93+ executable.name == 'ethtool'
94 user: root
95 command: ethtool {interface}
96 _description:
97@@ -135,7 +135,7 @@ id: ethernet/ethertool_eee_check_device_{interface}
98 _summary: Check ethtool EEE status for NIC {interface}
99 estimated_duration: 330.0
100 requires:
101- package.name == 'ethtool' or executable.name == 'ethtool'
102+ executable.name == 'ethtool'
103 user: root
104 command: ethtool --show-eee {interface} | grep "EEE status: enabled - active"
105 _description:
106diff --git a/units/info/jobs.pxu b/units/info/jobs.pxu
107index 286dcb0..a9031ad 100644
108--- a/units/info/jobs.pxu
109+++ b/units/info/jobs.pxu
110@@ -43,7 +43,7 @@ id: dmidecode_attachment
111 plugin: attachment
112 category_id: com.canonical.plainbox::info
113 requires:
114- package.name == 'dmidecode' or executable.name == 'dmidecode'
115+ executable.name == 'dmidecode'
116 dmi_present.state == 'supported'
117 user: root
118 command: dmidecode | iconv -t 'utf-8' -c
119@@ -54,7 +54,7 @@ _summary: Attach output of dmidecode
120 id: lshw_attachment
121 plugin: attachment
122 category_id: com.canonical.plainbox::info
123-requires: package.name == 'lshw' or executable.name == 'lshw'
124+requires: executable.name == 'lshw'
125 user: root
126 command: lshw | iconv -t 'utf-8' -c
127 _summary: Attach lshw output
128@@ -197,7 +197,7 @@ estimated_duration: 0.1
129 plugin: attachment
130 command: lsblk -i -n -P -o KNAME,TYPE,MOUNTPOINT
131 requires:
132- package.name == "util-linux" or executable.name == 'lsblk'
133+ executable.name == 'lsblk'
134 _description: Attaches disk block devices mount points
135 _summary: Attach info block devices and their mount points
136
137@@ -252,7 +252,7 @@ category_id: com.canonical.plainbox::info
138 id: info/hdparm_{name}.txt
139 estimated_duration: 1.0
140 requires:
141- package.name == 'hdparm' or executable.name == 'hdparm'
142+ executable.name == 'hdparm'
143 block_device.state != 'removable' and block_device.name == '{name}'
144 user: root
145 command: hdparm -I /dev/{name}
146@@ -446,7 +446,7 @@ plugin: attachment
147 category_id: com.canonical.plainbox::info
148 command: lstopo -v
149 estimated_duration: 0.015
150-requires: package.name == 'hwloc' or executable.name == 'lstopo'
151+requires: executable.name == 'lstopo'
152 _description: Attaches the system topology as presented by the lstopo command
153 _summary: Attach the output of lstopo
154
155@@ -454,7 +454,7 @@ id: lstopo_visual_attachment
156 plugin: attachment
157 category_id: com.canonical.plainbox::info
158 estimated_duration: 0.015
159-requires: package.name == 'hwloc' or executable.name == 'lstopo'
160+requires: executable.name == 'lstopo'
161 _description: Attaches the system topology as presented by the lstopo command
162 _summary: Attach the output of lstopo
163 command:
164diff --git a/units/memory/jobs.pxu b/units/memory/jobs.pxu
165index 06b2570..565493a 100644
166--- a/units/memory/jobs.pxu
167+++ b/units/memory/jobs.pxu
168@@ -46,7 +46,7 @@ estimated_duration: 11000.0
169 user: root
170 environ: STRESS_NG_MIN_SWAP_SIZE
171 requires:
172- package.name == 'stress-ng' or executable.name == 'stress-ng'
173+ executable.name == 'stress-ng'
174 command: stress_ng_test.py memory
175 _summary: Stress test of system memory
176 _description:
177diff --git a/units/miscellanea/jobs.pxu b/units/miscellanea/jobs.pxu
178index cac9647..45015d2 100644
179--- a/units/miscellanea/jobs.pxu
180+++ b/units/miscellanea/jobs.pxu
181@@ -99,7 +99,7 @@ plugin: shell
182 category_id: com.canonical.plainbox::miscellanea
183 id: miscellanea/ipmi_test
184 requires:
185- package.name == 'ipmitool' or executable.name == 'ipmitool'
186+ executable.name == 'ipmitool'
187 cpuinfo.platform != 's390x'
188 user: root
189 command: ipmi_test.py
190@@ -199,7 +199,7 @@ plugin: shell
191 category_id: com.canonical.plainbox::miscellanea
192 id: miscellanea/bmc_info
193 requires:
194- package.name == 'ipmitool' or executable.name == 'ipmitool'
195+ executable.name == 'ipmitool'
196 cpuinfo.platform != 's390x'
197 estimated_duration: 0.5
198 user: root
199@@ -214,7 +214,7 @@ plugin: shell
200 category_id: com.canonical.plainbox::miscellanea
201 id: miscellanea/cpus_are_not_samples
202 requires:
203- package.name == 'dmidecode' or executable.name == 'dmidecode'
204+ executable.name == 'dmidecode'
205 dmi_present.state == 'supported'
206 estimated_duration: 0.5
207 user: root
208@@ -228,7 +228,7 @@ plugin: shell
209 category_id: com.canonical.plainbox::miscellanea
210 id: miscellanea/dmitest_server
211 requires:
212- package.name == 'dmidecode' or executable.name == 'dmidecode'
213+ executable.name == 'dmidecode'
214 dmi_present.state == 'supported'
215 estimated_duration: 0.5
216 user: root
217diff --git a/units/power-management/jobs.pxu b/units/power-management/jobs.pxu
218index 58aae2a..5dfa56c 100644
219--- a/units/power-management/jobs.pxu
220+++ b/units/power-management/jobs.pxu
221@@ -347,7 +347,9 @@ plugin: user-interact-verify
222 category_id: com.canonical.plainbox::power-management
223 id: power-management/light_sensor
224 estimated_duration: 10.0
225-requires: dmi.product in ['Notebook','Laptop','Portable'] and executable.name == 'monitor-sensor'
226+requires:
227+ dmi.product in ['Notebook','Laptop','Portable']
228+ executable.name == 'monitor-sensor'
229 flags: also-after-suspend-manual
230 command: light_sensor_test.sh
231 _description:
232diff --git a/units/stress/jobs.pxu b/units/stress/jobs.pxu
233index 5a342da..aa12e28 100644
234--- a/units/stress/jobs.pxu
235+++ b/units/stress/jobs.pxu
236@@ -16,7 +16,7 @@ category_id: com.canonical.plainbox::stress
237 id: stress/cpu_stress_ng_test
238 estimated_duration: 7200.0
239 requires:
240- package.name == 'stress-ng' or executable.name == 'stress-ng'
241+ executable.name == 'stress-ng'
242 user: root
243 command:
244 if [ -n "$STRESS_NG_CPU_TIME" ]
245diff --git a/units/submission/jobs.pxu b/units/submission/jobs.pxu
246index 5a002bc..892d4e6 100644
247--- a/units/submission/jobs.pxu
248+++ b/units/submission/jobs.pxu
249@@ -18,7 +18,7 @@ id: raw_devices_dmi_json
250 plugin: attachment
251 category_id: com.canonical.plainbox::info
252 requires:
253- package.name == 'dmidecode' or executable.name == 'dmidecode'
254+ executable.name == 'dmidecode'
255 dmi_present.state == 'supported'
256 user: root
257 command:
258diff --git a/units/virtualization/jobs.pxu b/units/virtualization/jobs.pxu
259index dca284d..9471031 100644
260--- a/units/virtualization/jobs.pxu
261+++ b/units/virtualization/jobs.pxu
262@@ -21,7 +21,7 @@ id: virtualization/verify_lxd
263 environ: LXD_TEMPLATE LXD_ROOTFS
264 estimated_duration: 30.0
265 requires:
266- package.name == 'lxd-client' or executable.name == 'lxc'
267+ executable.name == 'lxc'
268 package.name == 'lxd' or snap.name == 'lxd'
269 command: virtualization.py --debug lxd
270 _description:

Subscribers

People subscribed via source and target branches