Optimize chocolatey.installed to save time and minion CPU cycles #68299
Closed
marcquark
started this conversation in
Feature Requests
Replies: 2 comments
-
I would say that a performance issue that causes noticeable effects on a PC/minion is a bug and should be reported as such. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using Salt to manage a handful of Windows laptops and i would like for them to periodically apply their highstate when they're powered on. Part of the state includes
chocolatey.installed
to ensure certain basic software is installed:Currently
chocolatey.installed
will query the remote repository which takes 3-4 seconds to complete and noticeably consumes the minion's CPU. It does so once for every package in the list, which means it gets worse with every package. "Noticeably" in my case with a total of 8 packages means the laptops' fans spin up for around 30-40 seconds which is rather annoying.I would like to introduce a small change
chocolatey.installed
, removing this call tochocolatey.version
altogether: https://github.com/saltstack/salt/blob/master/salt/states/chocolatey.py#L124. The necessary information is already present inpre_install
and can be reused. There is no need to query the remote repository at all.I have implemented and tested this change with my minion laptops and can confirm that execution time and CPU usage drop considerably (less than 1s per package, no fans spinning). I would appreciate a bit of guidance on how to properly submit a PR. I've already forked the project and am ready to push the change. How exactly do i go about writing a changelog entry as described in the Dev documentation? I don't have an issue number. Selecting "Feature Request" from the issue creation dialog sends me to the discussions board instead. I don't want to file a bug either since nothing is really broken.
Beta Was this translation helpful? Give feedback.
All reactions