-
Notifications
You must be signed in to change notification settings - Fork 83
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
[RHELC-1330] Port list_non_red_hat_pkgs_left to Action framework #1292
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1292 +/- ##
==========================================
+ Coverage 96.13% 96.18% +0.04%
==========================================
Files 57 58 +1
Lines 4818 4826 +8
Branches 846 847 +1
==========================================
+ Hits 4632 4642 +10
+ Misses 107 106 -1
+ Partials 79 78 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
convert2rhel/unit_tests/actions/conversion/list_non_red_hat_pkgs_left_test.py
Fixed
Show fixed
Hide fixed
convert2rhel/unit_tests/actions/conversion/list_non_red_hat_pkgs_left_test.py
Fixed
Show fixed
Hide fixed
convert2rhel/unit_tests/actions/conversion/list_non_red_hat_pkgs_left_test.py
Fixed
Show fixed
Hide fixed
Red Hat-signed ones during the conversion. | ||
""" | ||
super(ListNonRedHatPkgsLeft, self).run() | ||
pkghandler.list_non_red_hat_pkgs_left() |
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.
Since this is used only for this action, we can move the code from list_non_red_hat_pkgs_left
to run inside this run
method.
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.
I deliberately didn't do that because I thought we were moving towards having all the package management stuff in pkgmanager (so we move all the code that makes decisions about yum vs dnf into a nice polymorphic OO system).
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.
We will, eventually. But this function does not contain any difficult logic for yum/dnf to be ported. It is merely getting the packages from the system based on the gpg fingerprint and then printing it's information.
What I meant was to just do:
run(self):
loggerinst.info("Listing packages not signed by Red Hat")
non_red_hat_pkgs = get_installed_pkgs_w_different_fingerprint(system_info.fingerprints_rhel)
if non_red_hat_pkgs:
loggerinst.info("The following packages were left unchanged.\n")
print_pkg_info(non_red_hat_pkgs)
else:
loggerinst.info("All packages are now signed by Red Hat.")
convert2rhel/unit_tests/actions/conversion/list_non_red_hat_pkgs_left_test.py
Fixed
Show fixed
Hide fixed
convert2rhel/unit_tests/actions/conversion/list_non_red_hat_pkgs_left_test.py
Fixed
Show fixed
Hide fixed
convert2rhel/unit_tests/actions/conversion/list_non_red_hat_pkgs_left_test.py
Fixed
Show fixed
Hide fixed
convert2rhel/unit_tests/actions/conversion/list_non_red_hat_pkgs_left_test.py
Outdated
Show resolved
Hide resolved
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.
Looks very good!
/packit test --labels sanity |
@jochapma merge conflicts here to take care of. Once fixed and the rpm builds are done, retrigger tests in a comment |
Ando also remove the merge commits, thanks! |
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.
Looks good! Just please remove the merge commits.
/packit build |
/packit test --labels sanity |
/packit test --labels sanity |
…g#1292) Port list_non_red_hat_pkgs_left to Action framework. --------- Co-authored-by: Rodolfo Olivieri <[email protected]>
Port list_non_red_hat_pkgs_left to the Action framework
Jira Issues:
Checklist
[RHELC-]
or[HMS-]
is part of the PR titleRelease Pending
if relevant