Skip to content

Commit c4c2dc5

Browse files
Andersson007felixfonteinacozine
authored
collection_requirements: add requirements version specification recommendation to avoid conflicts when building EEs (#2585)
* collection_requirements: add requirements version specification recommendation * Update docs/docsite/rst/community/collection_contributors/collection_requirements.rst Co-authored-by: Felix Fontein <[email protected]> * Update docs/docsite/rst/community/collection_contributors/collection_requirements.rst Co-authored-by: Alicia Cozine <[email protected]> * Update docs/docsite/rst/community/collection_contributors/collection_requirements.rst Co-authored-by: Alicia Cozine <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> Co-authored-by: Alicia Cozine <[email protected]>
1 parent a72386f commit c4c2dc5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/docsite/rst/community/collection_contributors/collection_requirements.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,12 @@ Example: `meta/runtime.yml <https://github.com/ansible-collections/collection_te
199199
meta/execution-environment.yml
200200
------------------------------
201201

202-
If a collection has controller-side Python package and/or system package requirements, to allow easy :ref:`execution environment<getting_started_ee_index>` building, they SHOULD be listed in corresponding files under the ``meta`` directory, specified in ``meta/execution-environment.yml``, and `verified <https://ansible.readthedocs.io/projects/builder/en/latest/collection_metadata/#when-installing-collections-using-ansible-galaxy>`_.
202+
If a collection has controller-side Python package and/or system package requirements, to allow easy :ref:`execution environment<getting_started_ee_index>` building:
203+
204+
* They SHOULD be listed in corresponding files under the ``meta`` directory, specified in ``meta/execution-environment.yml``, and `verified <https://ansible.readthedocs.io/projects/builder/en/latest/collection_metadata/#when-installing-collections-using-ansible-galaxy>`_.
205+
* The entries in the file SHOULD NOT have a version cap or be fixed. Entries like ``<=x.x.x`` or ``==x.x.x`` are not allowed. Only ``>=x.x.x`` entries (with or without ``,!=x.x.x``), or no specified version at all are allowed.
206+
207+
* This rule helps prevent issues during the creation of execution environments, particularly when bundling collections that have conflicting versions of the same dependencies. For instance, if one collection requires a fixed version of a dependency while another requires a higher version of the same dependency, the build process will fail.
203208

204209
See the `Collection-level dependencies guide <https://ansible.readthedocs.io/projects/builder/en/latest/collection_metadata/#collection-level-dependencies>`_ for more information and `collection_template/meta <https://github.com/ansible-collections/collection_template/tree/main/meta>`_ directory content as an example.
205210

0 commit comments

Comments
 (0)