Repository navigation
win_pkg New Reporting for genrepo refresh_db & Fix #35342 #34781, New Unicode Support Software Names - #35899
Conversation
Fix#35342 Issue: win_pkg: refresh_db doesn't remove cached items which have been renamed or removed Solution: Conservative solution was to just remove *.sls files from \win\repo-ng tree as part of pkg.refresh_db instead of removing all of \win\repo-ng\salt-winrepo-ng Fix#34781 Issue: Logs did not contain enough information, and from executing it from the master it was too difficult to determine if there was an issue due to the output being data Solution: * pkg.genrepo now reports the status of the operation instead of the large about of metadata. The status report indicates: - Total SLS Files processed - Number of failed sls files - Number of successful sls files - list of files with errors and the render/compile errors they had - optionally a list of successfully render/compiled files and the package names within those files * pkg.refresh_db was also part of this issue, as it just reported a list of files copied from the same large list of files would be reported almost every time. As pkg.refresh_db calls pkg.genrepo after copy all the files it now reports the same as data as pkg.genrepo. Unicode Support Issue: Windows Registry module supports Unicode in development, win_pkg needed to be updated to support the Unicode output from reg.
function which has been removed * With Windows we ignore issues with refresh_db existing behaviour, update win_pkg.py to not report errors with refresh_db back to states/pkg.py. As part of doing this created an internal version if refresh_db called _refresh_db with different defaults
|
Seems these failures are not part of this PR. Please merge into Develop. |
…2-n-34781-reg-unicode
…2-n-34781-reg-unicode
…2-n-34781-reg-unicode
|
Not sure why jenkins/PR/salt-pr-linode-ubuntu14-n is reporting Maybe its to do with me fetching an merging develop to update the branch |
|
Thanks @meggiebot look forward to the feedback. |
|
Remove a blank line to pull the focus back on this PR |
|
Hi @rallytime seem to be getting lint issues from salt/modules/mongodb.py in develop outside of this PR. |
|
Hi @damon-atkins - Yeah I just fixed those at the HEAD of the develop branch. Don't worry about those for now. :) |
|
Thank you for your work here @damon-atkins! |
| os.makedirs(repo_local) | ||
| winrepo = os.path.join(repo_local, 'winrepo.p') | ||
|
|
||
| try: |
There was a problem hiding this comment.
What is the point of a try/except here, if all we do is raise the exception? 😕
|
I plan on doing another review of the code for example 'winrepo.p' is hard coded, and has been since day 1 by the look of it, but I notice in the doco their is a setting to set the name of for 'winrepo.p' Re your commends it should most likely just return -1 rather than raise an issue. Was not sure how to capture permission problems on windows. Going to put more smarts into _get_repo_src_dest pull some of the repeated code out in other sections. |
|
@meggiebot some items for release notes:
|
|
@damon-atkins Thanks! I let our doc guy know about your additions to the release notes. Just as an FYI, you can actually edit the release notes files and make any additions yourself. The Carbon release notes are here: The develop (currently leading up to Nitrogen) release notes are here: |
What does this PR do?
Fix #35342
Issue: win_pkg: refresh_db doesn't remove cached items which have been
renamed or removed
Solution: Conservative solution was to just remove *.sls files from
\win\repo-ng tree as part of pkg.refresh_db instead of removing all
of \win\repo-ng\salt-winrepo-ng
Fix #34781
Issue: Logs did not contain enough information, and from executing it from the
master it was too difficult to determine if there was an issue due to the
output being data
Solution:
large about of metadata. The status report indicates:
package names within those files
of files copied from the same large list of files would be reported almost
every time. As pkg.refresh_db calls pkg.genrepo after copy all the files
it now reports the same as data as pkg.genrepo.
Unicode Support
Issue: Windows Registry module supports Unicode in development, win_pkg
needed to be updated to support the Unicode output from reg.
What issues does this PR fix or reference?
Previous Behavior
pkg.genrepo return the data structure of the sls files, to did not report few issues to local logs, did not report any issues back to the master.
pkg.refresh_db
*provide a list of files copy from the master, the list of files copied was long always, as it was not a sync process.
New Behavior
Both pkg.genrepo and pkg.refresh_db report the same output from pkg.genrepo.
pkg.genrepo reports the status of render the files.
pkg.list_pkgs
Supports Unicode. It was dependant on Unicode changes to reg.py.
See Windows Registry Unicode Support and PY2 character encoding (module.reg) #32835
Tests written?
No Extra Tests. Tested against salt-winrepo-ng sls files.