ansible / ansible-builder

An Ansible execution environment builder
Other
289 stars 93 forks source link

Feature request: being able to add constraints for dependencies of ansible-core/ansible-runner/..., or to pin their dependencies #699

Open felixfontein opened 1 month ago

felixfontein commented 1 month ago

Right now it's possible to specify a specific ansible-core or ansible-runner version, but it's not possible to specify any constraints on their dependencies (or if there is, I didn't find it).

This causes a big problem right now because python-daemon 3.0.2 (a dependency of ansible-runner) breaks setuptools (https://pagure.io/python-daemon/issue/94), which breaks every single EE build that installs a Python dependency that uses setup.py / setup.cfg - and there's no way to avoid it since it's apparently not possible to tell ansible-builder to pin python-daemon to != 3.0.2.

(Maybe you can prepend build steps to manually install another version before ansible-builder calls pip, but I consider that a hack, not a good solution.)

felixfontein commented 1 month ago

(python-daemon 3.0.2 has been yanked, so that specific problem is solved, but having a way to pin or constrain dependencies is still a good thing to have :) )

webknjaz commented 1 month ago

@felixfontein is it possible to stick -c broken-constraints.txt into your requirements file?

felixfontein commented 1 month ago

@webknjaz there is no requirements file for ansible-runner and ansible-core, these are installed in a separate step by ansible-builder without any requirements file. See https://ansible.readthedocs.io/projects/builder/en/stable/definition/#dependencies: there you can only specify a single value package_pip for ansible_core and ansible_runner.