Skip to content
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

Merged
merged 12 commits into from
Feb 9, 2023

Commits on Feb 8, 2023

  1. 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>
    r0x0d committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    0c8f3f6 View commit details
    Browse the repository at this point in the history
  2. 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>
    r0x0d committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    4d0122e View commit details
    Browse the repository at this point in the history
  3. 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>
    r0x0d committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    5ebc2b0 View commit details
    Browse the repository at this point in the history
  4. Fix CodeQL error

    Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
    r0x0d committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    8ee9559 View commit details
    Browse the repository at this point in the history
  5. 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>
    r0x0d committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    1dd9bfe View commit details
    Browse the repository at this point in the history
  6. Apply suggestions from code review

    Co-authored-by: E Gustavsson <eric@spytec.se>
    r0x0d and Venefilyn committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    ba65d55 View commit details
    Browse the repository at this point in the history
  7. Fix comments from reviews

    Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
    r0x0d committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    d8fa709 View commit details
    Browse the repository at this point in the history
  8. 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>
    r0x0d committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    17642ea View commit details
    Browse the repository at this point in the history
  9. Remove unused property in dnf callback

    Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
    r0x0d committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    038d705 View commit details
    Browse the repository at this point in the history
  10. 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>
    r0x0d committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    f4235f4 View commit details
    Browse the repository at this point in the history
  11. Apply suggestions from code review

    Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
    r0x0d and abadger committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    ea905fd View commit details
    Browse the repository at this point in the history
  12. Apply suggestions from code review

    Co-authored-by: Preston Watson <104600742+pr-watson@users.noreply.github.com>
    r0x0d and pr-watson authored Feb 8, 2023
    Configuration menu
    Copy the full SHA
    ea360c0 View commit details
    Browse the repository at this point in the history