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

[Bug] requirements.txt uses static version of ansible-core #574

Open
lm-sig opened this issue Jan 13, 2025 · 1 comment
Open

[Bug] requirements.txt uses static version of ansible-core #574

lm-sig opened this issue Jan 13, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@lm-sig
Copy link

lm-sig commented Jan 13, 2025

Describe the bug
The requirements file as of version 2.0.0 points to a single version of ansible-core.

ansible-core==2.15.0

The README says "This collection requires ansible-core>=2.15.0" so which is it?

Ideally the requirements.txt file should match the README. As it is configured today the static assignment breaks some use cases. I use the requirements.txt with pip install (pip install -r ./requirements.txt). With Ansible 9 or Ansible 10 (ansible-core 2.16.x / ansible-core 2.17.x) the pip install tries to downgrade ansible-core to meet the nutanix.ncp requirements.txt file.

To Reproduce
Steps to reproduce the behavior:

  1. pip install ansible==10.7.0
  2. pip install -r ./nutanix/ncp/requirements.txt

Stack trace

...
  Attempting uninstall: ansible-core
    Found existing installation: ansible-core 2.17.7
    Uninstalling ansible-core-2.17.7:
      Successfully uninstalled ansible-core-2.17.7
...

Expected behavior
Ansible-core 2.16.x or higher should not be uninstalled and downgraded to 2.15.x.

Additional context

@lm-sig lm-sig added the bug Something isn't working label Jan 13, 2025
@lm-sig
Copy link
Author

lm-sig commented Jan 13, 2025

I'm not sure if the requirements.txt file is the best place for this, IMHO. Ansible already has a mechanism to check the ansible-core requirement in meta/runtime.yml and you are already using that. Other collections do not include ansible-core in their requirements.txt file so maybe it should just be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants