dell / ansible-powermax

Ansible Modules for Dell PowerMax
GNU General Public License v3.0
36 stars 37 forks source link

[BUG]: ansible-builder introspect fails with file not found #22

Closed murrahjm closed 2 years ago

murrahjm commented 2 years ago

Describe the bug When attempting to install this collection into an execution environment via the ansible-builder command, the build fails with an error that the requirements.txt file is not found. This appears to be caused by the use of a relative path in the meta/execution-environment.yml file.

To Reproduce Steps to reproduce the behavior:

  1. Step 1 install the collection with ansible-galaxy collection install dellemc.powermax
  2. Step 2 test collection with ansible-builder introspect --sanitize ~/.ansible/collections/
  3. Step 3 see error Expected requirements file not present at: /home/user/.ansible/collections/ansible_collections/dellemc/requirements.txt FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.ansible/collections/ansible_collections/dellemc/powermax/../requirements.txt' Note the parent folder reference ../requirements.txt
  4. Step 4 edit meta/execution-environment.yml and remove the relative path
    ---
    version: 1
    dependencies:
    galaxy: requirements.yml
    python: requirements.txt
  5. Step 5 test collection again and see proper output

Expected behavior ansible-builder introspect command should list correct dependencies

---
python:
- 'urllib3>=1.26.7  # from collection dellemc.powermax'
- 'PyU4V>=9.1.2.0  # from collection dellemc.powermax'
- 'setuptools  # from collection dellemc.powermax'

System Information (please complete the following information): ansible --version ansible [core 2.12.1] config file = /etc/ansible/ansible.cfg configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.8/site-packages/ansible ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.8.8 (default, Aug 25 2021, 16:13:02) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)] jinja version = 2.10.3 libyaml = True

murrahjm commented 2 years ago

similar bug for powerscale collection: https://github.com/dell/ansible-powerscale/issues/32

anupamaloke commented 2 years ago

This is fixed by #25