-
Notifications
You must be signed in to change notification settings - Fork 81
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-601] Install subscription-manager using package manager #1164
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1164 +/- ##
==========================================
+ Coverage 95.44% 95.53% +0.08%
==========================================
Files 54 54
Lines 4723 4705 -18
Branches 834 827 -7
==========================================
- Hits 4508 4495 -13
+ Misses 132 127 -5
Partials 83 83
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
42e99a5
to
a793dfd
Compare
/packit test --labels tier0 |
/packit build |
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.
Code seems good to me, just need to get integration tests passing. Here's hoping for a flawless test run 🤞
a217166
to
440b96f
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
Due to the nature of the change I want to wait for Satellite and offline integration tests to run successfully beforehand |
440b96f
to
421739b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
421739b
to
8f0c62f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
8f0c62f
to
3718b00
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
3718b00
to
a3cc6f5
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
a3cc6f5
to
b8f9878
Compare
b8f9878
to
83c634b
Compare
60e060d
to
ea4376b
Compare
/packit test --labels tier0 |
Tests failure seems unrelated |
b9b608b
to
2d45ebe
Compare
/packit test --labels tier0 |
2d45ebe
to
816ac77
Compare
/packit test --labels tier0 |
/packit test --labels tier0 |
In this commit, we are introducing the installation of subscription-manager directly through a package manager, instead of downloading the package first and then installing it with system package manager. This is necessary as we want to do GPG verification when installing those set of packages, in which case, it was not available when we used to download the packages and then install it via local install. Notable changes in this commit are: * Replacing installing subscription-manager to install it directly from the client-tools repository with gpg check enabled for all supported versions * Minor refactor to RestorablePackageSet class to allow it to be generic and use custom repository paths and content to install packages * Small tweak to call_yum_cmd to use the reposdir option as a list instead of a string * Move subscription-manager constants to subscription.py module instead of the packages.py backup module
Dropped the other two setopts we had defined in the past, namely, varsdir and reposdir, in order to accept only the params through setopts. Since we are introducing setopts in the previous commit, it makes sense to drop the varsdir and reposdir in favour of using only setopts, which maps to the same interface for yum/dnf.
Before, we were giving the ability to set up the repository to the restorable class, now, we require that the repository is set by the caller, and only let the restorable class where is the reposdir that it needs to use to install the package.
The data gets read in binary, thus, when we pass that to the write_temporary_repofile function it breaks, as it is expecting strings, not bytes.
Removing a couple of unused code and comments that are outdated from the code.
Included in this suggestions: - Suggestions applyed from the GitHub UI - Added a warning text to the docstring to tell the developers why we are using the client-tools repository the way we are using it - Reworked the write_temporary_repofile function to raise an error in case of failure instead of just logging an warning message and returning None, which could lead to errors that are not handled properly - Removed the dependencies_to_update function that is not necessary to be there anymore. Co-authored-by: Michal Bocek <mbocek@redhat.com>
830d520
to
77a370c
Compare
- Add message to the download_repofile function exception. We raise and log as critical what happened. - Improved comment in install_rhel_subscription_manager function to match what setopts is doing for OL7 Co-authored-by: Michal Bocek <mbocek@redhat.com>
77a370c
to
2835f9f
Compare
/packit test --labels tier0 |
In this commit, we are introducing the installation of subscription-manager directly through a package manager, instead of downloading the package first and then installing it with system package manager.
This is necessary as we want to do GPG verification when installing those set of packages, in which case, it was not available when we used to download the packages and then install it via local install.
Notable changes in this commit are:
Jira Issues: RHELC-601
Checklist
[RHELC-]
is part of the PR titleRelease Pending
if relevantDepends on