-
Notifications
You must be signed in to change notification settings - Fork 84
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-778] Add a progress indicator for the main package replacement #709
Conversation
Codecov ReportBase: 92.45% // Head: 92.69% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #709 +/- ##
==========================================
+ Coverage 92.45% 92.69% +0.24%
==========================================
Files 22 24 +2
Lines 3166 3270 +104
Branches 557 576 +19
==========================================
+ Hits 2927 3031 +104
Misses 172 172
Partials 67 67
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
/packit test |
On a call with @r0x0d and @kokesak, we have agreed that verification for this feature would be more or less sanity check. The nature of the implemented changes is cosmetic, therefore should not break anything inside the conversion. The current test suite is sufficient to catch any failures. |
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.
Not tested it in VM
4616ab4
to
7724712
Compare
@@ -15,20 +15,25 @@ | |||
# You should have received a copy of the GNU General Public License | |||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | |||
|
|||
|
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.
Another future note for me: This might get merge conflicts if #713 is merged first.
4f060b1
to
426f490
Compare
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.
One code change (that is very minor) and some grammar and spelling changes which aren't needed. This looks good to me. Note that I have not tested the change in a VM. Approving if you have tested.
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.
Overall seems good to me not tested it in VM. If you can demo this next week on the demo session on Tuesday that would be great @r0x0d
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.
These changes look good to me, approved
Nice idea! I will add that to the document |
Woops, file conflicts... I will do ahead and fix them. |
This commit introduces the callbacks classes for the progress indicators that we will be showing for the user during a few different phases in our code. The callbacks will called during these phases: * For DNF: Dependency Solver, Package Download and Transaction Progress * For YUM: Package Download and Transaction Progress We don't have a dependency solver callback for yum, because the yum code base does not provide any base class for us to override and iterate over, thus, we would require to copy and paste their own dependency resolver callback and deal adjust the code with the things we want and the ones we don't care. Since those classes are highly tied to the `base` usage, it is possible that we could mess with something and lead to obscure errors, thus, we are not using any dependency solver callback for YUM. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
We are refactoring the DNF and YUM modules to be in a separate folder, as, we are also placing the callback classes in it's own module, mostly because we are placing as well the licenses of the modules that we are using and adaptating from. Since we had to separate the callback classes to a new module and not place them in the previous `dnf.py` and `yum.py`, we went ahead and moved also the `dnf.py` and `yum.py` to be an `__init__.py`, but they are placed under their respective folders. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
This commit introduces the unit_tests regarding the progress indicators that we added for both DNF and YUM. It also follows the refactor that was done in `convert2rhel/pkgmanager/handlers/*` to better accommodate the changes. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
Adding more tests to cover 100% coverage for our dnf callback classes. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
Co-authored-by: E Gustavsson <eric@spytec.se>
Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
Since this work will introduce new folders and files, we figured out it was best to automate the packages discovery when building the project, rather than specifing manually every new folder to include. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
Added two more functions to the callback classes to handle the cases where a scriptlet will fail, or, the transaction will fail, so can we output a log message to the user and save it to our log file. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
fb0de24
to
ea905fd
Compare
Co-authored-by: Preston Watson <104600742+pr-watson@users.noreply.github.com>
Sorry to who approved the PR.. It will need another approval :D |
Pipeline is all green! Merging this as I already had approval before of the rebase. |
* Add progress indicators for DNF/YUM This commit introduces the callbacks classes for the progress indicators that we will be showing for the user during a few different phases in our code. The callbacks will called during these phases: * For DNF: Dependency Solver, Package Download and Transaction Progress * For YUM: Package Download and Transaction Progress We don't have a dependency solver callback for yum, because the yum code base does not provide any base class for us to override and iterate over, thus, we would require to copy and paste their own dependency resolver callback and deal adjust the code with the things we want and the ones we don't care. Since those classes are highly tied to the `base` usage, it is possible that we could mess with something and lead to obscure errors, thus, we are not using any dependency solver callback for YUM. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> * Refactor the handlers module to have it's own folder We are refactoring the DNF and YUM modules to be in a separate folder, as, we are also placing the callback classes in it's own module, mostly because we are placing as well the licenses of the modules that we are using and adaptating from. Since we had to separate the callback classes to a new module and not place them in the previous `dnf.py` and `yum.py`, we went ahead and moved also the `dnf.py` and `yum.py` to be an `__init__.py`, but they are placed under their respective folders. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> * Add unit_tests for the progress indicators This commit introduces the unit_tests regarding the progress indicators that we added for both DNF and YUM. It also follows the refactor that was done in `convert2rhel/pkgmanager/handlers/*` to better accommodate the changes. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> * Fix CodeQL error Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> * Add more coverage to the dnf callback classes Adding more tests to cover 100% coverage for our dnf callback classes. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> * Apply suggestions from code review Co-authored-by: E Gustavsson <eric@spytec.se> * Fix comments from reviews Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> * Update package discovery in setup.py Since this work will introduce new folders and files, we figured out it was best to automate the packages discovery when building the project, rather than specifing manually every new folder to include. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> * Remove unused property in dnf callback Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> * Fix comments from last review and added more logs Added two more functions to the callback classes to handle the cases where a scriptlet will fail, or, the transaction will fail, so can we output a log message to the user and save it to our log file. Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> * Apply suggestions from code review Co-authored-by: Toshio Kuratomi <a.badger@gmail.com> * Apply suggestions from code review Co-authored-by: Preston Watson <104600742+pr-watson@users.noreply.github.com> --------- Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> Co-authored-by: E Gustavsson <eric@spytec.se> Co-authored-by: Toshio Kuratomi <a.badger@gmail.com> Co-authored-by: Preston Watson <104600742+pr-watson@users.noreply.github.com>
Add progress indicators for DNF/YUM
This commit introduces the callbacks classes for the progress indicators
that we will be showing for the user during a few different phases in
our code.
The callbacks will called during these phases:
We don't have a dependency solver callback for yum, because the yum code
base does not provide any base class for us to override and iterate
over, thus, we would require to copy and paste their own dependency
resolver callback and deal adjust the code with the things we want and
the ones we don't care. Since those classes are highly tied to the
base
usage, it is possible that we could mess with something and leadto obscure errors, thus, we are not using any dependency solver callback
for YUM.
Signed-off-by: Rodolfo Olivieri rolivier@redhat.com
Jira Issue: RHELC-778
Checklist
[RHELC-]
is part of the PR titleRelease Pending