Repository navigation
Update to PR 35899 states/pkg (refresh fix) and win_pkg (winrepo cache mgt, refresh, doco, performance) - #36222
Conversation
code clean up and improvements based on feed back on the orginal PR e.g. dealing with configuration options, and refresh_db Also: - add missing doco mainly around parmeters to functions - previous updates for saltenv changes in develop several months ago broke compatibility with older 2015 and 2016 release, updates here to try to fix this.
|
Hi @rallytime |
…99_win_pkg Conflicts: salt/modules/win_pkg.py
|
Hi, @damon-atkins I'm testing this off your PR and I'm getting the following error: |
|
Thanks @UtahDave not sure how I missed that. I tested every function within win_pkg. It's good to have a review process. It will be fanatic when windows is tested in Jenkins. |
|
I added |
|
Sorry, after that fix I found another thing. Even with |
|
Also, I'm still seeing a pkg refresh_db for each |
|
The issue is with states/pkg.py The same issue exist in 2016.3 and most likely earlier see issue 36133. If you wish to test using highstate you need to use pkg.latest which works correctly |
|
Hi @UtahDave |
…x 36133 for carbon release, needs fixing older version still - Remove rtag function which return a file name - Create a new function called _refresh_tag_file which manages the refresh_db process rather than repeating simillar code in installed() and latest() - A few spots where missing logic to remove the refresh tag or it was called to late in the code, this has been fixed.
|
Hi @UtahDave please re-test. |
|
@damon-atkins this is looking pretty good according to my tests! |
|
@meggiebot Please Label C4 & Carbon |
|
@damon-atkins I have the issue labeled: #36133 We don't usually add the labels to PRs. I checked in on this and we're doing a final review internally, but it should be good to merge into Carbon shortly. |
|
@damon-atkins I'm reviewing this right now and also working on cleaning some of this up, so please don't submit any further commits as I'm working on changes of my own. This parameter is very awkwardly named. It also doesn't exist in any of the other package providers. I don't like the idea of the same function having different features on different platforms, and since there is literally nothing in the Salt codebase which utilizes this argument, I don't think it should be here. |
|
I also don't understand the reason for the >>> from salt.exceptions import CommandExecutionError
>>> exc = CommandExecutionError('Message goes here', info={'foo': 1, 'bar': 2})
>>> exc.info
{'foo': 1, 'bar': 2}
>>>Do you have a use case for not raising an exception? In some cases (like in your |
|
OK. You sort of need a page with common parameter names, so people can pick from them if they need one. I try to grep through all of the files to try and get an existing one. The problem is that some of the function return different structures based on how many argument are passed, which means its not consistent.. |
|
|
|
@damon-atkins I don't think it needs to remain public. I probably did it so I could more easily see what I was getting in the name map. Probably forgot to put it back... or thought it may be useful. |
|
OK, I made that function private again, and also made the last change that @damon-atkins mentioned. I also documented the two new parameters that @damon-atkins added to control whether or not the metadata is refreshed based on age. I also squashed the changes again and force-pushed the changes to my fork. Once @damon-atkins has had the chance to test this early next week, and we know that no further changes need to be made, then I can submit a pull request to his fork to get my cleanup into this PR. |
|
Testing Almost Complete. Looking Good So Far |
|
Here are the results of the testing all looking Good. |
|
@damon-atkins OK, if you are satisfied then I can submit my changes as a pull request to your fork, and once merged my changes will show up in this PR and we can get it merged. |
|
Thats fine with me. Just need to line up @UtahDave to test as well. |
Also make necessary changes to salt/states/pkg.py to make win_pkg.py play nicely with it.
|
OK, my changes have been submitted in damon-atkins#1. |
|
This is working fine in the manual tests I've been doing |
|
@damon-atkins if you can merge terminalmage's changes to your PR, I'll test again. |
Updates to salt/states/pkg.py, modules/win_pkg.py, doc/ref/configuration/minion.rst
|
@UtahDave What about the lint errors from @terminalmage changes. |
|
I'll get them. Thanks, @damon-atkins ! |
|
It looks like the lint errors did not make it in once merged. |
|
Oh, I may not have pulled, checking again. |
|
I did indeed forget to pull. PR incoming. |
|
#36590 takes care of the lint and fixes a traceback that Dave found in his testing which occurs when an uninstaller does not properly clear the registry entries for the software. |
|
@meggiebot some items for release notes:
|
What does this PR do?
modules/win_pkg.py
Code clean up and improvements based on feed back on the original PR
e.g. dealing with configuration options, and refresh_db
Also:
from disk.
e.g.
states/pkg.py Fixes
config additions
winrepo_cache_expire_maxandwinrepo_cache_expire_minWhat issues does this PR fix or reference?
See PR 35899
Thanks should go to @terminalmage for reviewing not just my code but the whole of win_pkg.py coding and improving it and also bring all of it back into line with salt coding style.
Previous Behavior
Carbon branch has compatibility issues with 2015 and 2016 with saltenv changes
Missing metadata db was reported as an error
New Behavior
More compatible with 2015 and 2016 re saltenv
Package State Files fetched and metadata created if missing or stale.
Tests written?
No Updates tests
Please review Salt's Contributing Guide for best practices.