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

ReqUpdater notifies about downgrade being available #11339

Closed
ogajduse opened this issue Apr 25, 2023 · 4 comments · Fixed by #11677
Closed

ReqUpdater notifies about downgrade being available #11339

ogajduse opened this issue Apr 25, 2023 · 4 comments · Fixed by #11677
Assignees
Labels
Bug This is an issue with the robottelo framework

Comments

@ogajduse
Copy link
Member

I have a newer version of broker installed in my venv than requirements.txt suggests and ReqUpdater reports requirement available, which makes me think that there is a package update available.

I would expect the plugin to report only package upgrades, not downgrades. Another acceptable solution would be to report the version inconsistency between venv/site-packages and requirements.txt

$ pip freeze | grep broker
broker==0.3.0
$ pytest -s --collect-only tests/foreman/api/test_docker.py
============================================================================================================ test session starts ============================================================================================================
platform linux -- Python 3.11.2, pytest-7.3.1, pluggy-1.0.0
Mandatory Requirements Available: jinja2==3.1.2 broker[docker]==0.2.17
Optional Requirements Available: pytest-cov==3.0.0 redis==4.5.4 pre-commit==3.2.2 sphinx-autoapi==2.1.0 flake8==6.0.0 manage>=0.1.13 sphinx==6.1.3
shared_function enabled - OFF - scope:  - storage: file
rootdir: /home/ogajduse/repos/robottelo
configfile: pyproject.toml
plugins: services-2.2.1, mock-3.10.0, ibutsu-2.2.4, fixture-tools-1.1.0, xdist-3.2.1, reportportal-5.1.6
collecting ... 2023-04-25 11:31:57 - robottelo.collection - INFO - Processing test items to add testimony token markers
collected 59 items                                                                                                                                                                                                                          

<Package api>
  <Module test_docker.py>
    <Class TestDockerRepository>
      <Function test_positive_create_with_name[0]>
... output omitted ...
@ogajduse ogajduse added the Bug This is an issue with the robottelo framework label Apr 25, 2023
@jyejare
Copy link
Member

jyejare commented Apr 25, 2023

Whatever version requirements.txt recommands should be installed to replicate the production like environment be its downgraded or upgraded.

Probably naming it as update might sound wrong but the intentions and implementation is clear.

@jyejare
Copy link
Member

jyejare commented Apr 25, 2023

Also, one has to rebase the branch with master (where master is upto date) to be production-like testing.

@ogajduse
Copy link
Member Author

If the implementation is correct, then the message could be improved.
Instead of
Mandatory Requirements Available:
it could be
Inconsistency in Mandatory Requirements:

@jyejare
Copy link
Member

jyejare commented May 31, 2023

There are less likely that we would had to downgrade the package (rare case) but mostly its update of req.

Just for a rare case I dont think we should change the motive and meesage of a tool.

Thoughts ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is an issue with the robottelo framework
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants