Hello,
I’d like to suggest changes to the Ansible community package collection requirements wrt dependencies versions specification.
Currently we recommend (i.e. it’s a SHOULD) to include files with dependencies under meta/.
The entries usually specify versions/ranges of the dependencies.
The issues imo occurs when a version is fixed, e.g. looks like my_dependency == 1.0.0 or has a cap, e.g. my_dependency <= 1.0.0.
In case we need to have more than one collection inside EE and one of them has a fixed/cap version and the other has a higher version of the same dependency, the build will fail. Example:
collection1_acme_dependency == 1.0.0
collection2_acme_dependency >= 2.0.0
Technically, you users can build multiple EEs to avoid the conflicts, but it’d probably require the following additional actions they’d have to do:
- building multiple EEs
- splitting roles to separate tasks done by those conflicting collections
- run them with different EEs
Maybe not a frequent case, but doesn’t feel great anyway.
Please share your thoughts on the following questions:
- Should we add a corresponding recommendation about not fixing,capping the versions, i.e. to merge collection_requirements: add requirements version specification recommendation to avoid conflicts when building EEs by Andersson007 · Pull Request #2585 · ansible/ansible-documentation · GitHub ?
- Should we make it even a MUST (I’ll change the PR ^ if there’s support) ?