pulp / pulp_ansible

A Pulp plugin that manages Ansible content, i.e. roles, collections
https://docs.pulpproject.org/pulp_ansible/
GNU General Public License v2.0
59 stars 54 forks source link

pulp-ansible not installable via PyPi b/c of version collision #1242

Closed itbane closed 2 years ago

itbane commented 2 years ago

Version

pulpcore: v3.21 pulp-ansible (to install): 0.14.1 pulp_installer: 3.21.0

Describe the bug

While trying to install pulpcore with pulp-ansible via ansible (pulp.pulp_installer) from pypi, the assertion for plugin compability fails due to a requirements mismatch.

(pulp) user@repo:/usr/local/lib/pulp$ bin/pip-compile -P pulp-ansible
Could not find a version that matches jsonschema<4.7,>=2.6.0,>=4.4,>=4.9.0 (from pulp-ansible==0.14.1)
Tried: 0.2, 0.2, 0.3, 0.3, 0.4, 0.4, 0.5, 0.5, 0.6, 0.6, 0.7, 0.7, 0.8.0, 0.8.0, 1.0.0, 1.0.0, 1.1.0, 1.1.0, 1.2.0, 1.2.0, 1.3.0, 1.3.0, 2.0.0, 2.0.0, 2.1.0, 2.1.0, 2.2.0, 2.2.0, 2.3.0, 2.3.0, 2.3.0, 2.4.0, 2.4.0, 2.4.0, 2.5.0, 2.5.0, 2.5.1, 2.5.1, 2.5.1, 2.6.0, 2.6.0, 3.0.0, 3.0.0, 3.0.1, 3.0.1, 3.0.2, 3.0.2, 3.1.0, 3.1.0, 3.1.1, 3.1.1, 3.2.0, 3.2.0, 4.0.0, 4.0.0, 4.0.1, 4.0.1, 4.1.0, 4.1.0, 4.1.1, 4.1.1, 4.1.2, 4.1.2, 4.2.0, 4.2.0, 4.2.1, 4.2.1, 4.3.0, 4.3.0, 4.3.1, 4.3.1, 4.3.2, 4.3.2, 4.3.3, 4.3.3, 4.4.0, 4.4.0, 4.5.0, 4.5.0, 4.5.1, 4.5.1, 4.6.0, 4.6.0, 4.6.1, 4.6.1, 4.6.2, 4.6.2, 4.7.0, 4.7.0, 4.7.1, 4.7.1, 4.7.2, 4.7.2, 4.8.0, 4.8.0, 4.9.0, 4.9.0, 4.9.1, 4.9.1, 4.10.0, 4.10.0, 4.10.1, 4.10.1, 4.10.2, 4.10.2, 4.10.3, 4.10.3, 4.11.0, 4.11.0, 4.12.0, 4.12.0, 4.12.1, 4.12.1, 4.13.0, 4.13.0, 4.14.0, 4.14.0, 4.15.0, 4.15.0, 4.16.0, 4.16.0
Skipped pre-versions: 0.1a0, 3.0.0a1, 3.0.0a1, 3.0.0a2, 3.0.0a2, 3.0.0a3, 3.0.0a3, 3.0.0a4, 3.0.0a4, 3.0.0a5, 3.0.0a5, 3.0.0a6, 3.0.0a6, 3.0.0b1, 3.0.0b1, 3.0.0b2, 3.0.0b2, 3.0.0b3, 3.0.0b3, 4.0.0a1, 4.0.0a1, 4.0.0a2, 4.0.0a2, 4.0.0a3, 4.0.0a3, 4.0.0a4, 4.0.0a4, 4.0.0a5, 4.0.0a5, 4.0.0a6, 4.0.0a6, 4.1.0a1, 4.1.0a1
There are incompatible versions in the resolved dependencies:
  jsonschema>=4.9.0 (from ansible-lint==6.5.2->galaxy-importer==0.4.5->pulp-ansible==0.14.1)
  jsonschema<4.7,>=4.4 (from pulp-ansible==0.14.1)
  jsonschema>=2.6.0 (from drf-spectacular==0.22.1->pulpcore==3.20.0->pulp-ansible==0.14.1)

The issue seems to be pulp-ansible 0.14.1 needing jsonschema < 4.7, while ansible-lint 6.5.2 (which is required via galaxy-import) requires jsonschema >= 4.9.

To Reproduce

# on a clean VM \w ansible installed
ansible-galaxy collection install pulp.pulp_installer
ansible-galaxy install geerlingguy.postgresql
cat << EOF > playbook.yaml
---
- name: local installation of pulpcore with pulp-ansible
  hosts: localhost
  become: true
  roles:
    - pulp.pulp_installer.pulp_all_services
  vars:
    pulp_install_plugins:
      pulp-ansible:
    pulp_settings:
      secret_key: "<secret_key>"
      content_origin: https://localhost
EOF
ansible-playbook playbook.yaml

Expected behavior

The installer should install pulpcore with pulp-ansible successfully.

Additional context

I'm not sure if this is an issue with the ansible collections ... but as it's a dependency issue, my guess is this is the right place.

mdellweg commented 2 years ago

I believe this should be solved by the release of 0.14.2. Can you close the issue if you can confirm that?

itbane commented 2 years ago

Yes, I can confirm - successfully deployed our new node with 0.14.2. Thanks for the quick resolution!