feat: add support for concurrent plugin installs#4491
Conversation
|
The container image build workflow finished with status: |
FYI I've tried to run a test instance of the |
|
/cc |
|
|
This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 21 days. |
|
Adding a comment to keep it alive, just in case the team still wants to pursue this optimization :) |
|
This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 21 days. |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 21 days. |



Description
Tries to allow concurrency on the plugin installation phase. The dynamic plugin installer so far allowed only sequential installation.
According to my benchmarks it can reduce 2x or 3x the time needed to install the plugins for your RHDH instance.
Key changes:
ThreadPoolExecutorwhich defaults to 5 workers, but that's configurable viaMAX_CONCURRENT_INSTALLS.skopeo inspectin parallel and use cached values in the sequential loop._oci_path_cachedict avoids redundant inspects across plugins from the same image.threading.Lockguards all concurrent writes toplugin_path_by_hash.PluginStatusDisplayjust to help the user read more easy what is happening.Which issue(s) does this PR fix
PR acceptance criteria
Please make sure that the following steps are complete:
How to test changes / Special notes to the reviewer
I've tested this both locally but also on a custom image I've built. I'll need for sure some guidance if futhre testing is required from my side.
Note, that intentionally I didn't want to do a lot of structural changes, like removing the skopeo dependency cause I feel this set of changes is more straightforward and with less risk involved. Looking at the benchmarks I feel it worths the effort.
For sure according to my experiments, removing the skopeo dependency will make this process even faster, mostly because the skopeo copy needs to fetch everything while we're ok downloading only a part of each image.