CiscoDevNet / ansible-mso

Cisco MSO Ansible Collection
https://galaxy.ansible.com/cisco/mso
GNU General Public License v3.0
26 stars 32 forks source link

Collection does not declare its dependency cisco.nd, which also is not part of the Ansible community distribution #479

Closed felixfontein closed 4 months ago

felixfontein commented 5 months ago

Description

While working on https://github.com/ansible/ansible/pull/83530 I noticde that I cannot run sanity tests for this collection without installing cisco.nd, since the Python code for many (maybe all?) modules in this collection does not work without that collection installed.

cisco.nd is not declared as a dependency of cisco.mso (https://github.com/CiscoDevNet/ansible-mso/blob/master/galaxy.yml#L24), and besides that cisco.mso cannot declare that dependency without violating the Ansible collection requirements (https://docs.ansible.com/ansible/devel/community/collection_contributors/collection_requirements.html#collection-dependencies) since cisco.nd is not part of the Ansible community package, while ansible.mso is part of it and thus has to adhere to these requirements.

The dependency on cisco.nd has apparently been added in https://github.com/CiscoDevNet/ansible-mso/commit/03f14123a80cdd4af095667c04e4c5c09dbf5b67 by adding an import from cisco.nd in plugins/module_utils/mso.py, which has first been contained in release https://github.com/CiscoDevNet/ansible-mso/releases/tag/v2.6.0.

Please remove that import and drop the dependency on cisco.nd as soon as possible, to restore functionality of this collection in the Ansible community package.

Ref: https://forum.ansible.com/t/7039

Affected Module Name(s):

Every module using plugins/module_utils/mso.py, which appears to be every module.

akinross commented 5 months ago

HI @felixfontein,

Thank you for raising the awareness, we will discuss this with the team.

lhercot commented 4 months ago

We have merged the fix and released v2.8.0 which include this fix.