-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
ansible-galaxy installs collections that are not compatible with the running Ansible version #78539
Comments
Files identified in the description:
If these files are incorrect, please update the |
Oh, and this is tagged 2.10, but obviously will apply to any newer version of Ansible, once collections start dropping support for them. |
There is only a runtime check if a collection |
While I personally would do the toggle the other way round ( |
that would break backwards compatibility, so it would have to default to current behaviour |
Do the galaxy APIs present this data now, when we added this feature they did not. Since it was a core only feature it only was checked at runtime, otherwise we'd have to download every collection version to determine the value of I can confirm that community galaxy does not expose this. |
looking at ansible/galaxy_ng@1215271 I'd say galaxy-ng has this data. |
we know they have the data, the problem is being able to query it over the web API |
Assuming that we eventually add this functionality, there are a few things to note:
|
I guess 1 would be yet another motivation for community galaxy to be upgraded to galaxy_ng :-) 2 is unfortunate, but has already been a problem now because Ansible 2.9 does ignore meta/runtime.yml completely, so you don't get a runtime warning there. (That might have avoided some unnecessary 'bug reports' for community.general when it dropped 2.9 support ;-) ). With such a feature in, at least at some point in the future (when folks stopped using too old ansible-core versions) everything will be better. (Like the good old pip versions in some ancient OS containers that do not understand Python requirements for PyPi packages, and thus require manual tests/utils/constraints.txt entries once a random dependency drops Python 2 support...) |
Summary
Today, if you execute
ansible-galaxy collection install community.docker
, you get version 3.0.1 which is only declaring compatibility with Ansible 2.11+ (see https://github.com/ansible-collections/community.docker/blob/3.0.1/meta/runtime.yml#L6)However, you get that version also when you're using
ansible-galaxy
from 2.10.Issue Type
Bug Report
Component Name
ansible-galaxy
Ansible Version
Configuration
OS / Environment
Fedora
Steps to Reproduce
ansible-galaxy collection install community.docker
on Ansible 2.10Expected Results
It to install a version before 3.0 which dropped 2.10 support
Actual Results
it installs 3.0.1
Code of Conduct
The text was updated successfully, but these errors were encountered: