-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run saltcheck tests in parallel #56097
Conversation
re-run pr-windows2016-py3 |
re-run pr-pre-commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mchugh19 I'm not a fan of overloading the meaning of config values or allowing them to have multiple types. I'd prefer that saltcheck_parallel
remain a boolean and use a second config value for the number of potential processes, that value can default to number of available processes.
Sure. That's easy enough. Maybe you could look over #56101 first, since either will need to be rebased after the other one is merged anyway. |
@dwoz as suggested, another |
What does this PR do?
Adds multiprocessing capability to saltcheck. I'm not sure if this is worth the additional complexity or if this is the way the core-team would like multiprocessing supported. Thoughts?
Tests will be run in parallel by adding
saltcheck_parallel: True
in minion config.Setting this value to an integer will set the maximum parallel processes.
For each state, tests are multiprocessed batched by
Optional value set in
saltcheck_parallel
or
The minimum between the number of processors or the number of tests for the state
Previous Behavior
Given tests
and
saltcheck processing runs sequentially
26 seconds of sleep completes in 31 seconds total
New Behavior
Same tests now finish faster
Same 26 seconds of sleep completes in 17 seconds (individual test duration time is no longer very accurate as it includes multiprocessing overhead and since many tests run in parallel, the sum into execution time is even more off (especially for a series of short tests))
Adjusting the sleeps to larger values totaling 59 seconds, completes in 30 seconds
Tests written?
No
Not sure how to write a test as the output is unchanged. Is it possible to write assertions against the debug log?
Commits signed with GPG?
No