Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible-builder fails because requirements.txt is missing for ibm.ibm_zos_cics collection #533

Closed
ansiblejunky opened this issue May 15, 2023 · 5 comments

Comments

@ansiblejunky
Copy link

ansiblejunky commented May 15, 2023

while using ansible-builder build command to build a Execution Environment for ibm_zos_cics collection, the following error occurs:

#17 [builder 4/5] RUN ansible-builder introspect --sanitize --user-pip=requirements.txt --write-bindep=/tmp/src/bindep.txt --write-pip=/tmp/src/requirements.txt
#17 sha256:be90875e3d1275789fbd93acd07d394ea933c266f98c37c278030d82bf999900
#17 0.644 Expected requirements file not present at: /usr/share/ansible/collections/ansible_collections/ibm/ibm_zos_cics/requirements.txt
#17 0.644 FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/ansible/collections/ansible_collections/ibm/ibm_zos_cics/requirements.txt'
#17 ERROR: executor failed running [/bin/sh -c ansible-builder introspect --sanitize --user-pip=requirements.txt --write-bindep=/tmp/src/bindep.txt --write-pip=/tmp/src/requirements.txt]: exit code: 1

#7 [stage-2 3/7] RUN ansible-galaxy collection install ibm.ibm_zos_cics
#7 sha256:251f4f3cb1489fa0a66c577c2d0726a6abc857c3d396a8ad6dd56042a03b75d2
#7 CANCELED

requirements.yml file has the latest version of ibm_zos_cics collection:

---
collections:
  - name: ibm.ibm_zos_cics
    version: 1.0.4

The collection:
https://github.com/ansible-collections/ibm_zos_cics

Not sure if this is an issue with ansible-builder or the collection itself, but posting this bug here too.
Original bug on collection is here

ansible-builder version 1.2.0

@github-actions github-actions bot added the needs_triage New item that needs to be triaged label May 15, 2023
@Akasurde
Copy link
Member

@ansiblejunky Thanks for reporting this. Could you please provide EE definition file used for building this EE? Thanks.

@Akasurde
Copy link
Member

@ansiblejunky ibm.ibm_zos_cics collection 1.0.4 is built without requirements.txt (this line is excluding it while ansible-galaxy collection build command). This is not a builder issue. Let me know if you feel the same.

Thanks,

@ansiblejunky
Copy link
Author

ansiblejunky commented May 16, 2023

When I git clone the collection locally, I see the requirements.txt in the root folder.
However, when I use ansible-galaxy collection install that file doesn't exist locally in the installed location. In fact, the following files do not exist anymore:

  • requirements.txt
  • bindep.txt
  • galaxy.yml

The meta folder exists.

This issue is happening for both ibm collections (core, cics).

@sivel
Copy link
Member

sivel commented May 16, 2023

That is a result of the collection explicitly stating that the artifact that they publish to galaxy should not contain the requirements.txt. The collection will need to be updated, and the build_ignores removed. Even if you state you want to install the collection from git, the process is to build the artifact first, then install, which will still strip the necessary files.

@sivel
Copy link
Member

sivel commented May 17, 2023

Going to close this, since it's not an issue with ansible-builder.

@sivel sivel closed this as completed May 17, 2023
@Akasurde Akasurde removed the needs_triage New item that needs to be triaged label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants