Throttle openQA jobs resources based on test parameters size#6952
Throttle openQA jobs resources based on test parameters size#6952mergify[bot] merged 2 commits intoos-autoinst:masterfrom
Conversation
d533344 to
8773335
Compare
okurz
left a comment
There was a problem hiding this comment.
In your commit message please write
Related progress issue: https://progress.opensuse.org/issues/192952
Please avoid the wording "malus" as it sounds so negative :) What we do is scale priority basically in both directions
8773335 to
0ff3dc0
Compare
|
it seems that https://app.circleci.com/pipelines/github/os-autoinst/openQA/19199/workflows/5a5b04f1-4a01-4606-8df0-4208907ae0b1/jobs/190404 is the same problem as the one we fixed in 21-needles.t. and add it to the same commit as the 21-needles.t fix |
0e67e72 to
2108ec9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6952 +/- ##
=======================================
Coverage 99.56% 99.56%
=======================================
Files 416 416
Lines 42396 42474 +78
=======================================
+ Hits 42210 42288 +78
Misses 186 186 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Going to apply the last discussed throttling logic, that includes a reference value, as described in ticket note-10 |
2108ec9 to
37e3bef
Compare
37e3bef to
257e135
Compare
257e135 to
b380acb
Compare
b380acb to
ad9bd8d
Compare
8c0125e to
64d82b1
Compare
|
The changes look good. The still open points are something that we better solve in follow-up PRs. I only recommend to fix some issues in the git commit messages: |
|
About the non-squashed |
64d82b1 to
576c99c
Compare
|
Really unclear what CI error is: despite |
It says "not ok - unhandled output found" so you need to ensure that tests run without any output. There must only be the line "$testname .... ok", nothing else. See |
62df4b4 to
0219620
Compare
|
CI successful, finally. |
lib/OpenQA/Setup.pm
Outdated
| return; | ||
| } | ||
| my %hash = map { my ($k, $s, $r) = $_ =~ /$u/g; $k => {scale => $s, reference => $r // 0} } | ||
| split(',', $throttling); |
There was a problem hiding this comment.
Remember that split always splits on a regex, even if you pass it as a simple string.
step 1: define a priority scaling for jobs resources based on a configuration
assign the configuration to parameter prio_throttling_parameters in openqa.ini
step 2: apply changes requested in PR#6952
Apply the priority throttling as by ticket's Suggestions in the description
use configuration format "<parameter_name>:<scale_decimal>:<reference_valuee>,..."
Set throttling code in create_from_settings,
Add 2 subtests in priority tests of t/api/04-jobs.t
step 3: move in a routine load_prio_throttling the format checking for throttling
load the resulting hash after validated the throtting configuration
and fix _load_prio_throttling,in Setup.pm
calculate the resulting priority and update debug_message,in Jobs.pm
update tests t/api/04-jobs.t and t/config.t to manage the throttling
update the throttling description in openqa.ini
fix comments in sub load_throttling_config
Ticket: https://progress.opensuse.org/issues/192952
0219620 to
ab5d3c4
Compare
|
We were in a collab session and refactored the throttling into its own function. |
... and use this in the tests to avoid executing the whole job posting process.
85a8ee0 to
3557cb4
Compare
Define a priority component for some resources to control, to be added to a job priority setting at test start time, to limit the jobs resources requests.
Store the configuration for all the needed resources in
openqa.inifile, inprio_throttling_parametersparameter, in a string of a format described in the ticket: "param1:scale1[:reference1],param2:scale2,...", to load the control values at openQA server start.